aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activemodel/test/cases/validations/validates_test.rb4
-rw-r--r--activemodel/test/cases/validations_test.rb2
-rw-r--r--activerecord/test/cases/associations/join_model_test.rb2
-rw-r--r--activerecord/test/cases/autosave_association_test.rb4
-rw-r--r--activerecord/test/cases/finder_test.rb4
-rw-r--r--activesupport/test/buffered_logger_test.rb4
-rw-r--r--activesupport/test/caching_test.rb4
7 files changed, 12 insertions, 12 deletions
diff --git a/activemodel/test/cases/validations/validates_test.rb b/activemodel/test/cases/validations/validates_test.rb
index d15fb4a524..b85e491a9c 100644
--- a/activemodel/test/cases/validations/validates_test.rb
+++ b/activemodel/test/cases/validations/validates_test.rb
@@ -45,7 +45,7 @@ class ValidatesTest < ActiveModel::TestCase
Person.validates :karma, :presence => true, :email => true, :if => :condition_is_true
person = Person.new
person.valid?
- assert ["can't be blank", "is not an email"], person.errors[:karma].sort
+ assert_equal ["can't be blank", "is not an email"], person.errors[:karma].sort
end
def test_validates_with_unless_shared_conditions
@@ -111,4 +111,4 @@ class ValidatesTest < ActiveModel::TestCase
person.valid?
assert_equal ['Local validator please'], person.errors[:title]
end
-end \ No newline at end of file
+end
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb
index aa75b8b0d2..af195af080 100644
--- a/activemodel/test/cases/validations_test.rb
+++ b/activemodel/test/cases/validations_test.rb
@@ -228,7 +228,7 @@ class ValidationsTest < ActiveModel::TestCase
t = Topic.new
assert t.invalid?
- assert ["NO BLANKS HERE"], t.errors[:title]
+ assert_equal ["NO BLANKS HERE"], t.errors[:title]
end
def test_list_of_validators_for_model
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb
index 8bdf8bcd55..dca72be4fd 100644
--- a/activerecord/test/cases/associations/join_model_test.rb
+++ b/activerecord/test/cases/associations/join_model_test.rb
@@ -289,7 +289,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase
end
def test_has_many_array_methods_called_by_method_missing
- assert true, authors(:david).categories.any? { |category| category.name == 'General' }
+ assert authors(:david).categories.any? { |category| category.name == 'General' }
assert_nothing_raised { authors(:david).categories.sort }
end
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb
index 2995cc6f72..5cc5dff633 100644
--- a/activerecord/test/cases/autosave_association_test.rb
+++ b/activerecord/test/cases/autosave_association_test.rb
@@ -765,7 +765,7 @@ class TestAutosaveAssociationOnAHasOneAssociation < ActiveRecord::TestCase
@ship.destroy
@pirate.reload.catchphrase = "Arr"
@pirate.save
- assert 'Arr', @pirate.reload.catchphrase
+ assert_equal 'Arr', @pirate.reload.catchphrase
end
def test_should_automatically_save_the_associated_model
@@ -885,7 +885,7 @@ class TestAutosaveAssociationOnABelongsToAssociation < ActiveRecord::TestCase
@pirate.destroy
@ship.reload.name = "The Vile Insanity"
@ship.save
- assert 'The Vile Insanity', @ship.reload.name
+ assert_equal 'The Vile Insanity', @ship.reload.name
end
def test_should_automatically_save_the_associated_model
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index e78db8969d..c73ad50a71 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -722,10 +722,10 @@ class FinderTest < ActiveRecord::TestCase
def test_find_all_by_one_attribute_with_options
topics = Topic.find_all_by_content("Have a nice day", :order => "id DESC")
- assert topics(:first), topics.last
+ assert_equal topics(:first), topics.last
topics = Topic.find_all_by_content("Have a nice day", :order => "id")
- assert topics(:first), topics.first
+ assert_equal topics(:first), topics.first
end
def test_find_all_by_array_attribute
diff --git a/activesupport/test/buffered_logger_test.rb b/activesupport/test/buffered_logger_test.rb
index 7a0ec2e910..5b072d4102 100644
--- a/activesupport/test/buffered_logger_test.rb
+++ b/activesupport/test/buffered_logger_test.rb
@@ -73,7 +73,7 @@ class BufferedLoggerTest < Test::Unit::TestCase
end
@logger.flush
- assert !@output.string.empty?, @logger.send(:buffer).size
+ assert !@output.string.empty?, @logger.send(:buffer).size.to_s
end
define_method "test_disabling_auto_flush_with_#{disable.inspect}_should_flush_at_max_buffer_size_as_failsafe" do
@@ -86,7 +86,7 @@ class BufferedLoggerTest < Test::Unit::TestCase
end
@logger.info 'there it is.'
- assert !@output.string.empty?, @logger.send(:buffer).size
+ assert !@output.string.empty?, @logger.send(:buffer).size.to_s
end
end
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index d9ff1207e7..3e14c754b7 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -375,7 +375,7 @@ module LocalCacheBehavior
def test_local_cache_of_write_nil
@cache.with_local_cache do
- assert true, @cache.write('foo', nil)
+ assert @cache.write('foo', nil)
assert_nil @cache.read('foo')
@peek.write('foo', 'bar')
assert_nil @cache.read('foo')
@@ -394,7 +394,7 @@ module LocalCacheBehavior
@cache.with_local_cache do
@cache.write('foo', 'bar')
@peek.delete('foo')
- assert true, @cache.exist?('foo')
+ assert @cache.exist?('foo')
end
end