Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

eliminate warnings

  • Loading branch information...
commit 4ef23971b6c69930c5cd1b728994716d46fa3214 1 parent f852ee1
@dchelimsky dchelimsky authored
View
14 lib/rspec/matchers/include.rb
@@ -22,14 +22,14 @@ def description
private
- def perform_match(predicate, hash_predicate, actual, expected)
- expected.send(predicate) do |expected|
- if comparing_hash_values?(actual, expected)
- expected.send(hash_predicate) {|k,v| actual[k] == v}
- elsif comparing_hash_keys?(actual, expected)
- actual.has_key?(expected)
+ def perform_match(predicate, hash_predicate, actuals, expecteds)
+ expecteds.send(predicate) do |expected|
+ if comparing_hash_values?(actuals, expected)
+ expected.send(hash_predicate) {|k,v| actuals[k] == v}
+ elsif comparing_hash_keys?(actuals, expected)
+ actuals.has_key?(expected)
else
- actual.include?(expected)
+ actuals.include?(expected)
end
end
end
View
3  lib/rspec/matchers/pretty.rb
@@ -39,7 +39,7 @@ def name_to_sentence
end
def expected_to_sentence
- to_sentence(@expected)
+ to_sentence(@expected) if defined?(@expected)
end
def name
@@ -55,7 +55,6 @@ def underscore(camel_cased_word)
word.downcase!
word
end
-
end
end
end
View
2  spec/rspec/matchers/change_spec.rb
@@ -113,7 +113,7 @@ def <<(element)
end
def dup
- self.class.new *elements
+ self.class.new(*elements)
end
def ==(other)
Please sign in to comment.
Something went wrong with that request. Please try again.