We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shoulda-matchers
Using shoulda-matchers for model validations will be easier to understand over the current example.
it { should validate_presence_of(:title) }
instead of
[:title, :body].each do |attribute| it "should validate presence of #{attribute}" do expect(post.errors[attribute].size).to be >= 1 expect(post.errors.messages[attribute]).to include "can't be blank" end end
The text was updated successfully, but these errors were encountered:
#238 Adding shoulda-matchers for testing models
b5469d4
Merge pull request #239 from reinteractive-open/adding_shoulda-matche…
e41adec
…rs_docs #238 Adding shoulda-matchers for testing models
No branches or pull requests
Using
shoulda-matchers
for model validations will be easier to understand over the current example.instead of
The text was updated successfully, but these errors were encountered: