1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

✂️ warning from controller renderer test

rails/actionpack/test/controller/renderer_test.rb:89: warning: possible reference to past scope - defaults
This commit is contained in:
Yuki Nishijima 2015-01-31 17:48:55 -08:00
parent aebba01f43
commit 1bb1b9e8cb

View file

@ -65,10 +65,10 @@ class RendererTest < ActiveSupport::TestCase
end
test 'same defaults from the same controller' do
defaults = ->(controller) { controller.renderer.defaults }
renderer_defaults = ->(controller) { controller.renderer.defaults }
assert defaults[AccountsController].equal? defaults[AccountsController]
assert_not defaults[AccountsController].equal? defaults[CommentsController]
assert renderer_defaults[AccountsController].equal? renderer_defaults[AccountsController]
assert_not renderer_defaults[AccountsController].equal? renderer_defaults[CommentsController]
end
test 'rendering with different formats' do