tests: add normalize_attribute helper method.
Add a custom Shoulda matcher for testing that a model correctly normalizes an attribute.
Usage:
subject { build(:wiki_page) }
should normalize_attribute(:title).from(" Azur Lane ").to("azur_lane")
This commit is contained in:
@@ -27,6 +27,7 @@ class ActiveSupport::TestCase
|
||||
include IqdbTestHelper
|
||||
include UploadTestHelper
|
||||
extend StripeTestHelper
|
||||
extend NormalizeAttributeHelper
|
||||
|
||||
mock_post_version_service!
|
||||
mock_pool_version_service!
|
||||
|
||||
Reference in New Issue
Block a user