Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
0d5cf111
Commit
0d5cf111
authored
Jul 21, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move custom matchers to their own files under spec/support/matchers
parent
ff8811c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
spec/support/matchers/include_module.rb
spec/support/matchers/include_module.rb
+0
-10
spec/support/matchers/is_within.rb
spec/support/matchers/is_within.rb
+9
-0
No files found.
spec/support/matchers.rb
→
spec/support/matchers
/include_module
.rb
View file @
0d5cf111
...
@@ -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
spec/support/matchers/is_within.rb
0 → 100644
View file @
0d5cf111
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment