Module: RSpec

Defined in:
lib/rspec-rails.rb,
lib/rspec/rails/version.rb,
lib/rspec/rails/adapters.rb,
lib/rspec/rails/matchers.rb,
lib/rspec/rails/view_assigns.rb,
lib/rspec/rails/configuration.rb,
lib/rspec/rails/feature_check.rb,
lib/rspec/rails/active_record.rb,
lib/rspec/rails/view_rendering.rb,
lib/rspec/rails/fixture_support.rb,
lib/rspec/rails/view_spec_methods.rb,
lib/rspec/rails/matchers/be_a_new.rb,
lib/rspec/rails/matchers/be_valid.rb,
lib/rspec/rails/view_path_builder.rb,
lib/rspec/rails/matchers/active_job.rb,
lib/rspec/rails/file_fixture_support.rb,
lib/rspec/rails/matchers/redirect_to.rb,
lib/rspec/rails/matchers/be_new_record.rb,
lib/rspec/rails/matchers/have_rendered.rb,
lib/rspec/rails/matchers/have_http_status.rb,
lib/rspec/rails/matchers/routing_matchers.rb,
lib/rspec/rails/example/job_example_group.rb,
lib/rspec/rails/example/job_example_group.rb,
lib/rspec/rails/example/view_example_group.rb,
lib/rspec/rails/example/rails_example_group.rb,
lib/rspec/rails/example/model_example_group.rb,
lib/rspec/rails/example/helper_example_group.rb,
lib/rspec/rails/example/mailer_example_group.rb,
lib/rspec/rails/example/mailer_example_group.rb,
lib/rspec/rails/example/system_example_group.rb,
lib/rspec/rails/example/request_example_group.rb,
lib/rspec/rails/example/feature_example_group.rb,
lib/rspec/rails/example/routing_example_group.rb,
lib/rspec/rails/example/controller_example_group.rb

Overview

The following code inspired and modified from Rails' assert_response:

github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/assertions/response.rb#L22-L38

Thank you to all the Rails devs who did the heavy lifting on this!

Defined Under Namespace

Modules: Rails