2
I created a test to validate my model and I want to know if it is correct.
describe Article do
it "object article create is valid?" do
article = Article.create
article.title = "Title for Test"
article.description = ""
article.body = "Body for Test"
article.position_image_highlighted = ""
expect(article.valid?).to be
end
end
Validation returns flawlessly, but I don’t know if this code has the best practice for the proper test.
This link has fantastic content: http://betterspecs.org/br/
– user3603