π§ͺ Part 8 β Testing in Rails: Built-in and Battle-Tested
RSpec model test example:
RSpec.describe Post, type: :model do
it "is valid with a title" do
post = Post.new(title: "Hello")
expect(post).to be_valid
end
end
Controller and integration tests are also built-in.
Top comments (0)