In Rspec model specs; we have specs to test any custom validation methods; however we're not currently testing standard rails validations (eg. validates :name, :presence => true).
FactoryGirl.lint partially does this by linting our factories and flagging any that fail validation; but do we also need to explicitly create a spec like:
let(:payee) { build :payee, name: nil }
it "should be invalid without a name" do
expect(payee).to_not be_valid
end
In Rspec model specs; we have specs to test any custom validation methods; however we're not currently testing standard rails validations (eg.
validates :name, :presence => true
).FactoryGirl.lint partially does this by linting our factories and flagging any that fail validation; but do we also need to explicitly create a spec like:
Or is that considered testing Rails itself?