diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-07 15:20:58 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-07 15:20:58 -0400 |
commit | 5dde413e1d14c42eb87071db20d075a7b962cb01 (patch) | |
tree | dcd858bd4b32d021f85c300c77710b5cd7a1e4de /actionpack/test | |
parent | f94a14d2c265982713248dd742ca75b33f458fb1 (diff) | |
download | rails-5dde413e1d14c42eb87071db20d075a7b962cb01.tar.gz rails-5dde413e1d14c42eb87071db20d075a7b962cb01.tar.bz2 rails-5dde413e1d14c42eb87071db20d075a7b962cb01.zip |
Undefine assings in IntegrationTest
assigns assert the state of a controller instance what should not be
done in an integration test.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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. |