Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-12-02 15:54:57 +0300
committerRémy Coutable <remy@rymai.me>2016-12-06 12:23:17 +0300
commit4e249d5baea99a52915025fc2827d01ab2d77c18 (patch)
tree98a0eaa592fdb17657e10a6cd9fe941b17c0253d /spec/support/matchers
parent90c0f610e29976608dbfeeb63bc4763982c5dbc3 (diff)
Use :maximum instead of :within for length validators with a 0..N range
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support/matchers')
-rw-r--r--spec/support/matchers/is_within.rb9
1 files changed, 0 insertions, 9 deletions
diff --git a/spec/support/matchers/is_within.rb b/spec/support/matchers/is_within.rb
deleted file mode 100644
index 0c35fc7e899..00000000000
--- a/spec/support/matchers/is_within.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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