diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-31 14:03:55 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-31 14:03:55 -0300 |
commit | b22c527e65a41da59dbfcb078968069c6fae5086 (patch) | |
tree | fd50b9a5b79cf2e3cd508032aec320c0280b5b99 /actionpack/test/dispatch | |
parent | 5e5107430bccc0a536e0b264c951793d8fe62235 (diff) | |
parent | cf4afc4d11556609802f640135cc7715e4a6a9fe (diff) | |
download | rails-b22c527e65a41da59dbfcb078968069c6fae5086.tar.gz rails-b22c527e65a41da59dbfcb078968069c6fae5086.tar.bz2 rails-b22c527e65a41da59dbfcb078968069c6fae5086.zip |
Merge branch 'minitest_cleanup'
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/live_response_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/request/session_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/routing/inspector_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/session/abstract_store_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/spec_type_test.rb | 41 | ||||
-rw-r--r-- | actionpack/test/dispatch/ssl_test.rb | 2 |
6 files changed, 5 insertions, 46 deletions
diff --git a/actionpack/test/dispatch/live_response_test.rb b/actionpack/test/dispatch/live_response_test.rb index e16f23914b..e0cfb73acf 100644 --- a/actionpack/test/dispatch/live_response_test.rb +++ b/actionpack/test/dispatch/live_response_test.rb @@ -11,7 +11,7 @@ module ActionController def test_header_merge header = @response.header.merge('Foo' => 'Bar') assert_kind_of(ActionController::Live::Response::Header, header) - refute_equal header, @response.header + assert_not_equal header, @response.header end def test_initialize_with_default_headers diff --git a/actionpack/test/dispatch/request/session_test.rb b/actionpack/test/dispatch/request/session_test.rb index 3f36d4f1a9..1517f96fdc 100644 --- a/actionpack/test/dispatch/request/session_test.rb +++ b/actionpack/test/dispatch/request/session_test.rb @@ -24,7 +24,7 @@ module ActionDispatch s['foo'] = 'bar' s1 = Session.create(store, env, {}) - refute_equal s, s1 + assert_not_equal s, s1 assert_equal 'bar', s1['foo'] end diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb index a3034ce001..c058bd4909 100644 --- a/actionpack/test/dispatch/routing/inspector_test.rb +++ b/actionpack/test/dispatch/routing/inspector_test.rb @@ -1,4 +1,4 @@ -require 'minitest/autorun' +require 'active_support/testing/autorun' require 'action_controller' require 'rails/engine' require 'action_dispatch/routing/inspector' diff --git a/actionpack/test/dispatch/session/abstract_store_test.rb b/actionpack/test/dispatch/session/abstract_store_test.rb index 8daf3d3f5e..fe1a7b4f86 100644 --- a/actionpack/test/dispatch/session/abstract_store_test.rb +++ b/actionpack/test/dispatch/session/abstract_store_test.rb @@ -42,7 +42,7 @@ module ActionDispatch as.call(@env) session1 = Request::Session.find @env - refute_equal session, session1 + assert_not_equal session, session1 assert_equal session.to_hash, session1.to_hash end diff --git a/actionpack/test/dispatch/spec_type_test.rb b/actionpack/test/dispatch/spec_type_test.rb deleted file mode 100644 index 6cd19fd333..0000000000 --- a/actionpack/test/dispatch/spec_type_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -require "abstract_unit" - -class SpecTypeTest < ActiveSupport::TestCase - def assert_dispatch actual - assert_equal ActionDispatch::IntegrationTest, actual - end - - def refute_dispatch actual - refute_equal ActionDispatch::IntegrationTest, actual - end - - def test_spec_type_resolves_for_matching_acceptance_strings - assert_dispatch MiniTest::Spec.spec_type("WidgetAcceptanceTest") - assert_dispatch MiniTest::Spec.spec_type("Widget Acceptance Test") - assert_dispatch MiniTest::Spec.spec_type("widgetacceptancetest") - assert_dispatch MiniTest::Spec.spec_type("widget acceptance test") - end - - def test_spec_type_wont_match_non_space_characters_acceptance - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\tTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\rTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\nTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Acceptance\fTest") - refute_dispatch MiniTest::Spec.spec_type("Widget AcceptanceXTest") - end - - def test_spec_type_resolves_for_matching_integration_strings - assert_dispatch MiniTest::Spec.spec_type("WidgetIntegrationTest") - assert_dispatch MiniTest::Spec.spec_type("Widget Integration Test") - assert_dispatch MiniTest::Spec.spec_type("widgetintegrationtest") - assert_dispatch MiniTest::Spec.spec_type("widget integration test") - end - - def test_spec_type_wont_match_non_space_characters_integration - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\tTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\rTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\nTest") - refute_dispatch MiniTest::Spec.spec_type("Widget Integration\fTest") - refute_dispatch MiniTest::Spec.spec_type("Widget IntegrationXTest") - end -end diff --git a/actionpack/test/dispatch/ssl_test.rb b/actionpack/test/dispatch/ssl_test.rb index 6f075a9074..b4a39219bf 100644 --- a/actionpack/test/dispatch/ssl_test.rb +++ b/actionpack/test/dispatch/ssl_test.rb @@ -47,7 +47,7 @@ class SSLTest < ActionDispatch::IntegrationTest def test_disable_hsts_header self.app = ActionDispatch::SSL.new(default_app, :hsts => false) get "https://example.org/" - refute response.headers['Strict-Transport-Security'] + assert_not response.headers['Strict-Transport-Security'] end def test_hsts_expires |