aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/test
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-02-28 22:42:24 +0000
committerLeon Breedt <bitserf@gmail.com>2005-02-28 22:42:24 +0000
commit6b93952ae6866a82adccc3a8c8d022f3ac674c59 (patch)
treecb66f01dcbce8d64fc62505141b7252d3707c5b8 /actionwebservice/test
parent4ba8d08481316e764181db09bba4f7fb2e65807a (diff)
downloadrails-6b93952ae6866a82adccc3a8c8d022f3ac674c59.tar.gz
rails-6b93952ae6866a82adccc3a8c8d022f3ac674c59.tar.bz2
rails-6b93952ae6866a82adccc3a8c8d022f3ac674c59.zip
add allow_active_record_expects option to ActionWebService::API::Base,
but set the default to false so people don't use it without thinking about the consequences. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test')
-rw-r--r--actionwebservice/test/api_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionwebservice/test/api_test.rb b/actionwebservice/test/api_test.rb
index a84726f0b5..a3679335fc 100644
--- a/actionwebservice/test/api_test.rb
+++ b/actionwebservice/test/api_test.rb
@@ -56,6 +56,10 @@ class TC_API < Test::Unit::TestCase
api_method :test, :expects => [ActiveRecord::Base]
end
end
+ klass = Class.new(ActionWebService::API::Base) do
+ allow_active_record_expects true
+ api_method :test2, :expects => [ActiveRecord::Base]
+ end
assert_raises(ActionWebService::ActionWebServiceError) do
klass = Class.new(ActionWebService::API::Base) do
api_method :test, :invalid => [:int]