Skip to content

Commit

Permalink
fix deprecation warning "expect { }.not_to raise_error(SpecificErrorC…
Browse files Browse the repository at this point in the history
…lass)"

DEPRECATION: `expect { }.not_to raise_error(SpecificErrorClass)` is deprecated.
Use `expect { }.not_to raise_error()` instead.
  • Loading branch information
onk committed Aug 8, 2013
1 parent 782258e commit 136470c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/models/pin_spec.rb
Expand Up @@ -32,14 +32,14 @@
it "nop" do
@pin = FactoryGirl.build(:pin, member: @member, link: "link_2")
@pin.destroy_over_limit_pins
expect { @old_pin.reload }.not_to raise_error ActiveRecord::RecordNotFound # be_destroyed
expect { @old_pin.reload }.not_to raise_error # be_destroyed
end
end
context "over limit" do
it "older pin is destroyed" do
@pin = FactoryGirl.create(:pin, member: @member, link: "link_2") # run after_create
expect { @old_pin.reload }.to raise_error ActiveRecord::RecordNotFound # be_destroyed
expect { @pin.reload }.not_to raise_error ActiveRecord::RecordNotFound # not be_destroyed
expect { @pin.reload }.not_to raise_error # not be_destroyed
end
end
end
Expand Down

0 comments on commit 136470c

Please sign in to comment.