aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/test')
-rw-r--r--activeresource/test/base_errors_test.rb7
-rw-r--r--activeresource/test/base_test.rb4
2 files changed, 4 insertions, 7 deletions
diff --git a/activeresource/test/base_errors_test.rb b/activeresource/test/base_errors_test.rb
index 1aa677b1ba..c6b840ebe1 100644
--- a/activeresource/test/base_errors_test.rb
+++ b/activeresource/test/base_errors_test.rb
@@ -6,11 +6,8 @@ class BaseErrorsTest < Test::Unit::TestCase
ActiveResource::HttpMock.respond_to do |mock|
mock.post "/people.xml", {}, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><errors><error>Age can't be blank</error><error>Name can't be blank</error><error>Name must start with a letter</error><error>Person quota full for today.</error></errors>", 400
end
- @exception = nil
- @person = Person.new(:name => '', :age => '')
- @person.save
- rescue ActiveResource::ResourceInvalid
- @exception = $!
+ @person = Person.new(:name => '', :age => '')
+ assert_equal @person.save, false
end
def test_should_mark_as_invalid
diff --git a/activeresource/test/base_test.rb b/activeresource/test/base_test.rb
index f3fd3b43e2..dd017b71fa 100644
--- a/activeresource/test/base_test.rb
+++ b/activeresource/test/base_test.rb
@@ -109,7 +109,7 @@ class BaseTest < Test::Unit::TestCase
def test_create
rick = Person.new
- rick.save
+ assert_equal true, rick.save
assert_equal '5', rick.id
end
@@ -133,7 +133,7 @@ class BaseTest < Test::Unit::TestCase
matz.name = "David"
assert_kind_of Person, matz
assert_equal "David", matz.name
- matz.save
+ assert_equal true, matz.save
end
def test_update_with_custom_prefix