Skip to content
Browse files

use eq matcher instead of eql

- the eq matcher is the default matcher for equality. It redirects to
  ==, whereas the eql matcher redirects to eql?, which has varied
  semantics across types.
  • Loading branch information...
1 parent e5f7094 commit 9cdadc4b559722dfa6afd5f72fda98e94b785ac6 @dchelimsky dchelimsky committed Jan 21, 2013
View
8 spec/rspec/rails/example/feature_example_group_spec.rb
@@ -10,7 +10,7 @@ module RSpec::Rails
include FeatureExampleGroup
end
- expect(group.metadata[:type]).to eql(:feature)
+ expect(group.metadata[:type]).to eq(:feature)
end
it "includes Rails route helpers" do
@@ -22,8 +22,8 @@ module RSpec::Rails
include FeatureExampleGroup
end
- expect(group.new.foo_path).to eql("/foo")
- expect(group.new.foo_url).to eql("http://www.example.com/foo")
+ expect(group.new.foo_path).to eq("/foo")
+ expect(group.new.foo_url).to eq("http://www.example.com/foo")
end
describe "#visit" do
@@ -49,7 +49,7 @@ def visit(url)
include FeatureExampleGroup
end
- expect(group.new.visit("/foo")).to eql("success: /foo")
+ expect(group.new.visit("/foo")).to eq("success: /foo")
end
end
end
View
2 spec/rspec/rails/mocks/stub_model_spec.rb
@@ -112,7 +112,7 @@ def model_class
describe "alternate primary key" do
it "has the correct primary_key name" do
- stub_model(AlternatePrimaryKeyModel).class.primary_key.to_s.should eql('my_id')
+ stub_model(AlternatePrimaryKeyModel).class.primary_key.to_s.should eq('my_id')
end
it "has a primary_key" do

0 comments on commit 9cdadc4

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