rspec-rails
https://github.com/rspec/rspec-rails
Ruby
RSpec for Rails 5+
RSpec::Rails::ViewAssigns#view_assigns
Compat-shim for AbstractController::Rendering#view_assigns _assigns was deprecated in favor of view_assigns after Rails-3.0.0 was released. Since we are not able to predict when the _assigns/view_assigns patch will be released (I thought it would have been in 3.0.1, but 3.0.1 bypassed this change for a security fix), this bit ensures that we do the right thing without knowing anything about the Rails version we are dealing with. Once that change _is_ released, this can be changed to something that checks for the Rails version when the module is being interpreted, as it was before commit dd0095.
Edit
git clone [email protected]:rspec/rspec-rails.git
cd rspec-rails
open lib/rspec/rails/view_assigns.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-RSpec--Rails--ViewAssigns-view_assigns-for-pr
# Commit to gitgit add lib/rspec/rails/view_assigns.rbgit commit -m "better docs for RSpec::Rails::ViewAssigns#view_assigns"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-RSpec--Rails--ViewAssigns-view_assigns-for-pr
hub pull-request
# Celebrate!