Permalink
Browse files

eliminate some warnings

  • Loading branch information...
1 parent 868c3ef commit f9ff5421cdcb5ae84b0e8ee22a59dcf1020cc6f6 @dchelimsky dchelimsky committed Nov 7, 2010
Showing with 4 additions and 2 deletions.
  1. +1 −1 lib/rspec/matchers/have.rb
  2. +3 −1 lib/rspec/matchers/matcher.rb
@@ -4,7 +4,7 @@ class Have #:nodoc:
def initialize(expected, relativity=:exactly)
@expected = (expected == :no ? 0 : expected)
@relativity = relativity
- @actual = nil
+ @actual = @collection_name = @plural_collection_name = nil
end
def relativities
@@ -11,7 +11,9 @@ def initialize(name, *expected, &declarations)
@expected = expected
@actual = nil
@diffable = false
- @expected_exception, @rescued_exception = nil
+ @expected_exception, @rescued_exception = nil, nil
+ @match_for_should_not_block = nil
+
@messages = {
:description => lambda {"#{name_to_sentence}#{expected_to_sentence}"},
:failure_message_for_should => lambda {|actual| "expected #{actual.inspect} to #{name_to_sentence}#{expected_to_sentence}"},

0 comments on commit f9ff542

Please sign in to comment.