summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-07-21 22:09:58 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-07-22 00:01:17 -0400
commit0d5cf111f3070994c0e80ef764d1bd4b9e4936b1 (patch)
treef435de3cf95481da997dece63f386fcfb7e90b70
parentff8811c40b33a3a98203478925810035fffe7094 (diff)
downloadgitlab-ce-0d5cf111f3070994c0e80ef764d1bd4b9e4936b1.tar.gz
Move custom matchers to their own files under spec/support/matchers
-rw-r--r--spec/support/matchers/include_module.rb (renamed from spec/support/matchers.rb)10
-rw-r--r--spec/support/matchers/is_within.rb9
2 files changed, 9 insertions, 10 deletions
diff --git a/spec/support/matchers.rb b/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