Top "Rspec3" questions

RSpec 3 is a major release of the Behaviour-Driven Development tool for Ruby programmers.

rspec 3 - stub a class method

I am upgrading from rspec 2.99 to rspec 3.0.3 and have converted instance methods to use allow_any_instance_of, but haven't …

ruby-on-rails ruby rspec rspec3
RSpec allow/expect vs just expect/and_return

In RSpec, specifically version >= 3, is there any difference between: Using allow to set up message expectations with parameters that …

ruby testing rspec mocking rspec3
How is spec/rails_helper.rb different from spec/spec_helper.rb? Do I need it?

I am doing the Rails Tutorial for the second time. When I enter this rails generate integration_test static_pages …

ruby-on-rails testing rspec rspec-rails rspec3
Rails 4, rspec 3: model validation test

I have an organization object that has attributes name, doing_business_as. I need to validate that the name is …

validation ruby-on-rails-4 rspec3
`require': cannot load such file -- spec_helper (LoadError)

I am creating bundler gem --test=rspec MyGem. in which I'm getting the repository structure. When I try to run …

ruby rspec rspec2 rspec-rails rspec3
Set header in RSpec 3 request

I'm trying to set the header for some RSpec requests that require authentication. The header is ACCESS_TOKEN. No matter …

ruby-on-rails rspec ruby-on-rails-4.1 rspec3
In RSpec, using let variable inside before :all block

I have the following code inside most of my tests: describe 'index' let(:company) { FactoryGirl.create(:company) } let(:user) { FactoryGirl.…

ruby-on-rails ruby rspec rspec3
Rspec to have(n).items undefined method

I'm trying to follow a guide on code.tuts and I keep getting an error. Here is my Library spec: …

ruby rspec rspec3
rspec failing error: expected false to respond to `false?`

I am running this portion of a test: describe Dictionary do before do @d = Dictionary.new end it 'can check …

ruby rspec rspec3
expected true to respond to true?

I upgraded my rspec-rails to 3.0.1 and now I'm seeing this error on all of my tests Failure/Error: Sidekiq::Status::…

ruby-on-rails ruby-on-rails-4 rspec rspec-rails rspec3