Skip to content

Adding rails-controller-testing** gem does not fix NoMethodError message #5

@jasnow

Description

@jasnow

Adding rails-controller-testing gem to my Rails 5 fork of codeforatlanta's show-me-the-food5 (https://github.com/jasnow/show-me-the-food5) repo's Gemfile does not fix the following message:

  • NoMethodError:assigns has been extracted to a gem. To continue using it, add gem 'rails-controller-testing' to your Gemfile.

Appears to not be the only one: http://stackoverflow.com/questions/30605868/rails-controller-testing-gem


If you run "rake" before upgrading to the most recent version of Rails 5, no tests break.

After adding the gem rails-controller-testing, running "bundle update", and then running "rake," you get:

Failures:

  1) LocationsController#index assigns @locations
     Failure/Error: subject{ assigns(:locations) }
     NoMethodError:
       assigns has been extracted to a gem. To continue using it,
               add `gem 'rails-controller-testing'` to your Gemfile.
     # /home/jasnow/.rvm/gems/ruby-2.2.2/bundler/gems/rails-7220ffcffd00/
       actionpack/lib/action_dispatch/testing/test_process.rb:8:in `assigns'
     # ./spec/controllers/locations_controller_spec.rb:5:in `block
       (3 levels) in <top (required)>'
     # ./spec/controllers/locations_controller_spec.rb:9:in `block
       (3 levels) in <top (required)>'

Finished in 0.29375 seconds (files took 3.41 seconds to load)
1 example, 1 failure

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions