aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-07-19 22:33:51 +0200
committerJosé Valim <jose.valim@gmail.com>2010-07-19 22:35:17 +0200
commitc3c349ec3e9a3990cac4d256c308b18fd35d9606 (patch)
tree1e0b108921cef2e9ecfed309f01a0db22fe564d4 /actionpack
parent17600eb435693f333af46912fd796fcdff5657b2 (diff)
downloadrails-c3c349ec3e9a3990cac4d256c308b18fd35d9606.tar.gz
rails-c3c349ec3e9a3990cac4d256c308b18fd35d9606.tar.bz2
rails-c3c349ec3e9a3990cac4d256c308b18fd35d9606.zip
Remove assert_valid. It was already deprecated on Rails 2.3.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions.rb2
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/model.rb19
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb15
3 files changed, 0 insertions, 36 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions.rb b/actionpack/lib/action_dispatch/testing/assertions.rb
index 0e4a92048f..822150b768 100644
--- a/actionpack/lib/action_dispatch/testing/assertions.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions.rb
@@ -1,7 +1,6 @@
module ActionDispatch
module Assertions
autoload :DomAssertions, 'action_dispatch/testing/assertions/dom'
- autoload :ModelAssertions, 'action_dispatch/testing/assertions/model'
autoload :ResponseAssertions, 'action_dispatch/testing/assertions/response'
autoload :RoutingAssertions, 'action_dispatch/testing/assertions/routing'
autoload :SelectorAssertions, 'action_dispatch/testing/assertions/selector'
@@ -11,7 +10,6 @@ module ActionDispatch
included do
include DomAssertions
- include ModelAssertions
include ResponseAssertions
include RoutingAssertions
include SelectorAssertions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/model.rb b/actionpack/lib/action_dispatch/testing/assertions/model.rb
deleted file mode 100644
index 46714418c6..0000000000
--- a/actionpack/lib/action_dispatch/testing/assertions/model.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-module ActionDispatch
- module Assertions
- module ModelAssertions
- # Ensures that the passed record is valid by Active Record standards and
- # returns any error messages if it is not.
- #
- # ==== Examples
- #
- # # assert that a newly created record is valid
- # model = Model.new
- # assert_valid(model)
- #
- def assert_valid(record)
- ::ActiveSupport::Deprecation.warn("assert_valid is deprecated. Use assert record.valid? instead", caller)
- assert record.valid?, record.errors.full_messages.join("\n")
- end
- end
- end
-end
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index 765e111226..53cdd358b4 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -482,21 +482,6 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase
assert_redirected_to :controller => 'admin/user'
end
- def test_assert_valid
- get :get_valid_record
- assert_deprecated { assert_valid assigns('record') }
- end
-
- def test_assert_valid_failing
- get :get_invalid_record
-
- begin
- assert_deprecated { assert_valid assigns('record') }
- assert false
- rescue ActiveSupport::TestCase::Assertion => e
- end
- end
-
def test_assert_response_uses_exception_message
@controller = AssertResponseWithUnexpectedErrorController.new
get :index