I upgraded my rspec version to the latest version and I have tests that have similar syntax
it "should delete a company" do
expect { click_link "Delete Company" }.should change(Company, :count).by(-1)
end
I looked at the documentation and I could not see anything that would do this in the current verion ... any ideas on how to achieve this
The error I get is
9) Company Pages Edit page as an admin user should delete a company
Failure/Error: expect { click_link "Delete Company" }.should change(Company, :count).by(-1)
NoMethodError:
undefined method `call' for #<RSpec::Expectations::ExpectationTarget:0x007fccafdfc360>
# ./spec/requests/companies_spec.rb:79:in `block (3 levels) in <top (required)>'
Trace source
share