Skip to content
Browse files

Get rid of double negation in custom matcher

  • Loading branch information...
1 parent be63ec3 commit 875d534eff1155518cc395038e8c10af6ae00bc3 @kaishin kaishin committed Jan 29, 2013
Showing with 2 additions and 3 deletions.
  1. +1 −2 spec/neat/media_spec.rb
  2. +1 −1 spec/support/matchers/be_contained_in.rb
View
3 spec/neat/media_spec.rb
@@ -36,13 +36,12 @@
end
context "with argument 'max-width 480px 6'" do
- it "outputs (max-width: 480px)" do
+ it "outputs (max-width: 480px)" do
expect('.change-media-context-shorthand').to be_contained_in('screen and (max-width: 480px)')
end
it "uses a 6-column grid" do
expect('.change-media-context').to have_rule('width: 100%')
end
end
-
end
View
2 spec/support/matchers/be_contained_in.rb
@@ -1,7 +1,7 @@
RSpec::Matchers.define :be_contained_in do |expected|
match do |actual|
@query = ParserSupport.parser.find_by_selector(actual, expected)
- !@query.empty?
+ @query.any?
end
failure_message_for_should do |actual|

0 comments on commit 875d534

Please sign in to comment.
Something went wrong with that request. Please try again.