Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Spec file tidyup
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Jun 28, 2020
1 parent 079e1d6 commit f610d5e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions spec/rspec/matchers/built_in/have_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def respond_to?(method_name)
end

describe "expect(...).to have_attributes(with_one_attribute)" do

it_behaves_like "an RSpec matcher", :valid_value => Person.new("Correct name", 33), :invalid_value => Person.new("Wrong Name", 11) do
let(:matcher) { have_attributes(:name => "Correct name") }
end
Expand Down Expand Up @@ -101,7 +100,6 @@ def count
end

describe "expect(...).to have_attributes(key => matcher)" do

it "passes when the matchers match" do
expect(person).to have_attributes(:age => (a_value > 30))
end
Expand All @@ -120,7 +118,6 @@ def count
end

describe "expect(...).to_not have_attributes(with_one_attribute)" do

it "passes if target does not have any of the expected attributes" do
expect(person).to_not have_attributes(:age => wrong_age)
end
Expand Down Expand Up @@ -151,7 +148,6 @@ def count
end

describe "expect(...).to have_attributes(with_multiple_attributes)" do

it_behaves_like "an RSpec matcher", :valid_value => Person.new("Correct name", 33), :invalid_value => Person.new("Wrong Name", 11) do
let(:matcher) { have_attributes(:name => "Correct name", :age => 33) }
end
Expand Down Expand Up @@ -195,7 +191,6 @@ def count
end

describe "expect(...).to_not have_attributes(with_multiple_attributes)" do

it "passes if target has none of the expected attributes" do
expect(person).to_not have_attributes(:name => wrong_name, :age => wrong_age)
end
Expand Down Expand Up @@ -230,5 +225,4 @@ def count
def object_inspect(object)
surface_descriptions_in object.inspect
end

end

0 comments on commit f610d5e

Please sign in to comment.