Skip to content

Commit

Permalink
Convert to strings so array can be sorted deterministically
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Aug 4, 2017
1 parent 31f6100 commit 2194c27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/test/application/loading_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ class Post < ActiveRecord::Base
require "#{rails_root}/config/environment"
setup_ar!

assert_equal [ActiveStorage::Blob, ActiveStorage::Attachment, ActiveRecord::SchemaMigration, ActiveRecord::InternalMetadata].sort, ActiveRecord::Base.descendants.sort
assert_equal [ActiveStorage::Blob, ActiveStorage::Attachment, ActiveRecord::SchemaMigration, ActiveRecord::InternalMetadata].collect(&:to_s).sort, ActiveRecord::Base.descendants.collect(&:to_s).sort
get "/load"
assert_equal [ActiveStorage::Blob, ActiveStorage::Attachment, ActiveRecord::SchemaMigration, ActiveRecord::InternalMetadata, Post].sort, ActiveRecord::Base.descendants.sort
assert_equal [ActiveStorage::Blob, ActiveStorage::Attachment, ActiveRecord::SchemaMigration, ActiveRecord::InternalMetadata, Post].collect(&:to_s).sort, ActiveRecord::Base.descendants.collect(&:to_s).sort
get "/unload"
assert_equal [ActiveStorage::Blob, ActiveStorage::Attachment, ActiveRecord::SchemaMigration, ActiveRecord::InternalMetadata].sort, ActiveRecord::Base.descendants.sort
assert_equal [ActiveStorage::Blob, ActiveStorage::Attachment, ActiveRecord::SchemaMigration, ActiveRecord::InternalMetadata].collect(&:to_s).sort, ActiveRecord::Base.descendants.collect(&:to_s).sort
end

test "initialize cant be called twice" do
Expand Down

0 comments on commit 2194c27

Please sign in to comment.