Top "Rspec-rails" questions

rspec-rails is an extension of the RSpec testing framework that provides support for testing Ruby on Rails applications.

How to test strong params with Rspec?

What is the actual strategy to test strong params filtering in Rails controller with Rspec? (Except shoulda matchers) How to …

ruby-on-rails ruby ruby-on-rails-4 rspec rspec-rails
Rails rspec and omniauth (integration testing)

My Rails 3.2 app uses OmniAuth and Devise to sign in with Twitter. The authentication system works fine. I would like …

ruby-on-rails-3 rspec integration-testing omniauth rspec-rails
Rails 3.1 plugin gem, dummy test app, rspec

So Rails 3.1 comes with a little-known handy "rails g plugin new" generator, which gives you a skeleton suitable for a …

ruby-on-rails rspec gem ruby-on-rails-plugins rspec-rails
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
How to add "config.include FactoryBot::Syntax::Methods" to rspec config block in spec_helper.rb?

If I add: config.include FactoryBot::Syntax::Methods under RSpec.configure do |config| and run rspec, I see this error: /…

ruby-on-rails rspec factory-bot rspec-rails
Mocking chain of methods in rspec

There are a chain of methods which gets a user object. I am trying to mock the following to return …

ruby-on-rails ruby rspec rspec-rails
RSpec stub helper method in controller spec

Found similar questions but surprisingly none, that I've found, give a simple answer... Trying to stub a helper method in …

ruby-on-rails rspec rspec-rails
Rspec Controller testing with Javascript

How do you test a controller in Rspec if the controller only responds with javascript? For example this would be …

ruby-on-rails-3.1 rspec2 rspec-rails
ActionMailer sending real emails in test mode! - How to turn off?

Newly signed up users to my little app must be approved by the admin (me) before they can gain access …

ruby-on-rails-3 actionmailer rspec-rails sendgrid
Rspec/Capybara loading in progress, circular require considered harmful

Unsure if this is a Capybara issue, but I just did a fresh install of Rails (4.1.1) and Rspec Rails (3.0.1) and …

ruby-on-rails ruby ruby-on-rails-4 capybara rspec-rails