diff --git a/spec/support/matchers.rb b/spec/support/matchers/include_module.rb similarity index 54% rename from spec/support/matchers.rb rename to spec/support/matchers/include_module.rb index d9b27ab08d8..0a78af1e90e 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers/include_module.rb @@ -11,13 +11,3 @@ RSpec::Matchers.define :include_module do |expected| "expected #{described_class} to include the #{expected} module" end end - -# Extend shoulda-matchers -module Shoulda::Matchers::ActiveModel - class ValidateLengthOfMatcher - # Shortcut for is_at_least and is_at_most - def is_within(range) - is_at_least(range.min) && is_at_most(range.max) - end - end -end diff --git a/spec/support/matchers/is_within.rb b/spec/support/matchers/is_within.rb new file mode 100644 index 00000000000..0c35fc7e899 --- /dev/null +++ b/spec/support/matchers/is_within.rb @@ -0,0 +1,9 @@ +# Extend shoulda-matchers +module Shoulda::Matchers::ActiveModel + class ValidateLengthOfMatcher + # Shortcut for is_at_least and is_at_most + def is_within(range) + is_at_least(range.min) && is_at_most(range.max) + end + end +end