Skip to content
This repository
Browse code

Fix ruby warnings.

/Users/myron/code/rspec-dev/repos/rspec-expectations/lib/rspec/matchers/dsl.rb:8: warning: method redefined; discarding old ignore
/Users/myron/code/rspec-dev/repos/rspec-expectations/lib/rspec/matchers/dsl.rb:8: warning: previous definition of ignore was here
  • Loading branch information...
commit a8d90140ff92e3e9db3d318e82beccb7167ef7ae 1 parent b0d5007
Myron Marston myronmarston authored

Showing 1 changed file with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. +8 8 spec/rspec/matchers/dsl_spec.rb
16 spec/rspec/matchers/dsl_spec.rb
@@ -22,13 +22,13 @@ def ok
22 22 end
23 23
24 24 it "has access to methods available in the scope of the example" do
25   - RSpec::Matchers::define(:ignore) {}
26   - ignore.question?.should eq(:answer)
  25 + RSpec::Matchers::define(:matcher_a) {}
  26 + matcher_a.question?.should eq(:answer)
27 27 end
28 28
29 29 it "raises when method is missing from local scope as well as matcher" do
30   - RSpec::Matchers::define(:ignore) {}
31   - expect { ignore.i_dont_exist }.to raise_error(NameError)
  30 + RSpec::Matchers::define(:matcher_b) {}
  31 + expect { matcher_b.i_dont_exist }.to raise_error(NameError)
32 32 end
33 33
34 34 it "clears user instance variables between invocations" do
@@ -45,13 +45,13 @@ def ok
45 45
46 46 describe "#respond_to?" do
47 47 it "returns true for methods in example scope" do
48   - RSpec::Matchers::define(:ignore) {}
49   - ignore.should respond_to(:question?)
  48 + RSpec::Matchers::define(:matcher_c) {}
  49 + matcher_c.should respond_to(:question?)
50 50 end
51 51
52 52 it "returns false for methods not defined in matcher or example scope" do
53   - RSpec::Matchers::define(:ignore) {}
54   - ignore.should_not respond_to(:i_dont_exist)
  53 + RSpec::Matchers::define(:matcher_d) {}
  54 + matcher_d.should_not respond_to(:i_dont_exist)
55 55 end
56 56 end
57 57 end

0 comments on commit a8d9014

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