Changes to RSpec Error checking
I am trying to follow a tutorial on TDD with RSpec that contains the following line:
it 'must have a first_name' do p = Person.new p.should_not be_valid p.errors.on(:first_name).should_not be_nil end
However I receive the following message in my test:
undefined method `on' for #ActiveModel::Errors:0x007fde0c3eceb0>
What is the correct way to write the code above.
The correct function is errors_on. So that line should be