Skip to content

Commit e26b768

Browse files
eileencodespixeltrix
authored andcommitted
Replace use of assigns in test
`assigns` was removed from Rails and using `instance_variable_get` is the new correct way to assign an instance variable in tests.
1 parent 37e5427 commit e26b768

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/caching_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def test_invalid_format_returns_not_acceptable
563563
private
564564

565565
def content_to_cache
566-
assigns(:cache_this)
566+
@controller.instance_variable_get(:@cache_this)
567567
end
568568

569569
def fragment_exist?(path)

0 commit comments

Comments
 (0)