Skip to content

Commit

Permalink
✂️ warning from controller renderer test
Browse files Browse the repository at this point in the history
rails/actionpack/test/controller/renderer_test.rb:89: warning: possible reference to past scope - defaults
  • Loading branch information
yuki24 committed Feb 1, 2015
1 parent aebba01 commit 1bb1b9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionpack/test/controller/renderer_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 1bb1b9e

Please sign in to comment.