I have 2 model: Answer and Book. Although they are very similar, all tests pass to Answer but 1 test fails for Book models/answer.rb models/book. ...
I have 2 model: Answer and Book. Although they are very similar, all tests pass to Answer but 1 test fails for Book models/answer.rb models/book. ...
I am trying to test my polymorphic association but I cant seem to get it to pass Model: Now my test looks like The error that I am getting Foo ...
I am writing tests for an application and ran into a problem. I have the next validation im my model: def correct_date errors.add(:occured_at, ...
How to test using shoulda-matchers for these actions, to response JSON success 200, and fail 422 and how to test with normal RSpec: both cases if you ...
I have a model with a unique index at the db level and model validation checking for uniqueness scoped to multiple columns. In the spec I have: it ...
I tried to use shoulda-matchers to test the association between models. However, it always show Error: TakingTest#test_belongs_to: NoMethodError: unde ...
I need to write specs to check permitted params for create action. For some reason I'm getting: Expected POST #create to restrict parameters on :j ...
I'm trying to test a delegate method of my Comment model using shoulda-matchers (3.1.2) & rspec-rails (3.7.2) in my rails (5.0.1) application with ...