O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What Can We Do in a Model Test?

An RSpec file in the spec/models directory is automatically of type: :model, which gives you…not a whole lot of new behavior, actually. There is an add-on gem called rspec-activemodel-mocks, which is maintained by the RSpec core team and includes some mock-object tools specific to use with ActiveModel.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required