From 49e41cb83c11980af2be4ff7f9aff1fc718e34ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Mon, 27 Apr 2015 15:40:42 -0300 Subject: [PATCH] adding tests order config --- test/action_controller/serialization_test.rb | 6 +++--- test/test_helper.rb | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/action_controller/serialization_test.rb b/test/action_controller/serialization_test.rb index 361a65a4..ff84655c 100644 --- a/test/action_controller/serialization_test.rb +++ b/test/action_controller/serialization_test.rb @@ -319,13 +319,13 @@ module ActionController response = JSON.parse(@response.body) expected_return = { + "id"=>1, + "time"=>DateTime.now.to_s, "post" => { "id"=>1, "title"=>"New Post", "body"=>"Body" - }, - "id"=>1, - "time"=>DateTime.now.to_s + } } assert_equal 'application/json', @response.content_type diff --git a/test/test_helper.rb b/test/test_helper.rb index f3977b61..dbb2b7f0 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -12,7 +12,8 @@ Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) class Foo < Rails::Application if Rails.version.to_s.start_with? '4' config.action_controller.perform_caching = true - ActionController::Base.cache_store = :memory_store + config.active_support.test_order = :random + ActionController::Base.cache_store = :memory_store end end