Commit 0d5cf111 authored by Robert Speicher's avatar Robert Speicher

Move custom matchers to their own files under spec/support/matchers

parent ff8811c4
...@@ -11,13 +11,3 @@ RSpec::Matchers.define :include_module do |expected| ...@@ -11,13 +11,3 @@ RSpec::Matchers.define :include_module do |expected|
"expected #{described_class} to include the #{expected} module" "expected #{described_class} to include the #{expected} module"
end end
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
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment