diff --git a/test/models/confirmable_test.rb b/test/models/confirmable_test.rb index 66167bba..2659ed4a 100644 --- a/test/models/confirmable_test.rb +++ b/test/models/confirmable_test.rb @@ -342,7 +342,7 @@ class ReconfirmableTest < ActiveSupport::TestCase :confirmation_sent_at, :confirmation_token, :confirmed_at, - :unconfirmable_email + :unconfirmed_email ] end end diff --git a/test/support/assertions.rb b/test/support/assertions.rb index 95de3448..b03b2ad7 100644 --- a/test/support/assertions.rb +++ b/test/support/assertions.rb @@ -25,11 +25,10 @@ class ActiveSupport::TestCase assert_no_difference('ActionMailer::Base.deliveries.size') { yield } end - def assert_same_content(expected, result) - assert expected.size == result.size, "the arrays doesn't have the same content" + def assert_same_content(result, expected) + assert expected.size == result.size, "the arrays doesn't have the same size" expected.each do |element| - result.index(element) - assert !element.nil?, "the arrays doesn't have the same content" + assert result.include?(element), "The array doesn't include '#{element}'." end end