rspec_rails_4 icon indicating copy to clipboard operation
rspec_rails_4 copied to clipboard

Everyday Rails Testing with RSpec (Rails 4.0 Edition)

Results 42 rspec_rails_4 issues
Sort by recently updated
recently updated
newest added

Disclaimer: I am new to RSpec and trying to build tests on an existing app using the some of the examples in this book. The below is replicating a test...

Hello, Can someone please help? I've created the rspec test for validating uniqueness of email in spec/models/contact_spec.rb and run it (exactly the way it's done in everydayrails) and it isn't...

In the sample application, every .ruby-version file is written as "2.0.0" but I think such a version does not exist. So I had to update .ruby-version for each branch. But...

You are testing JSON API in controller specs, but some people say it should be tested in request specs: http://matthewlehner.net/rails-api-testing-guidelines/ > Use RSpec Request Specs > > Since we’ve established...

The following issues are regarding the code example on the top of page 26 as well as the first line after this example: > This spec uses RSpec's include matcher...

In this book `eq` does not have parentheses but only in "Testing PATCH requests" section, has them. E.g. ``` ruby # `eq @contact` is preferred for consistency expect(assigns(:contact)).to eq(@contact) ```

In ch.5 p45 - you wrote "at least as of RSpec 2.8", but this edition is using RSpec 2.14, so this difference is a little uncomfortable, at least for me.

I tried the following pending scenario by myself and found some issues. ``` ruby context "as a guest" do scenario "reads a news release" do pending "You write this one!"...

In ch5. p52, there is `expect(@contact.reload.hidden?).to be_true`, but in this case `expect(@contact.reload).to be_hidden` is simpler.

In Ch.7 p80, there are `actual` and `expected` in `require_login.rb`, but `expected` is not used in it. This might lead to confusing. So adding some description would be helpful for...