From 5dde413e1d14c42eb87071db20d075a7b962cb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 7 Oct 2016 15:20:58 -0400 Subject: Undefine assings in IntegrationTest assigns assert the state of a controller instance what should not be done in an integration test. --- actionpack/test/controller/integration_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index d3bc77d3ef..cf96b9b752 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -383,6 +383,14 @@ class IntegrationTestTest < ActiveSupport::TestCase mixin.__send__(:remove_method, :method_missing) end end + + def test_assigns_is_undefined_and_not_point_to_the_gem + e = assert_raises(NoMethodError) do + @test.assigns(:foo) + end + + assert_match(/undefined method/, e.message) + end end # Tests that integration tests don't call Controller test methods for processing. -- cgit v1.2.3