Skip to content

Commit 49e41cb

Browse files
committed
adding tests order config
1 parent b706e52 commit 49e41cb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/action_controller/serialization_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,13 @@ def test_render_fragment_changed_object_with_relationship
319319
response = JSON.parse(@response.body)
320320

321321
expected_return = {
322+
"id"=>1,
323+
"time"=>DateTime.now.to_s,
322324
"post" => {
323325
"id"=>1,
324326
"title"=>"New Post",
325327
"body"=>"Body"
326-
},
327-
"id"=>1,
328-
"time"=>DateTime.now.to_s
328+
}
329329
}
330330

331331
assert_equal 'application/json', @response.content_type

test/test_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
class Foo < Rails::Application
1313
if Rails.version.to_s.start_with? '4'
1414
config.action_controller.perform_caching = true
15-
ActionController::Base.cache_store = :memory_store
15+
config.active_support.test_order = :random
16+
ActionController::Base.cache_store = :memory_store
1617
end
1718
end
1819

0 commit comments

Comments
 (0)