diff options
author | José Valim <jose.valim@gmail.com> | 2009-08-01 16:47:44 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-08-07 17:16:16 +0200 |
commit | 7034272354ad41dd4d1c90138a79e7f14ebc2bed (patch) | |
tree | 51c091d7ff973bbeb1aa2bd7417d0da3a9ed71ba /actionpack/test/lib | |
parent | f59984cc81bd1a64a53a2480a9b4e05fe7357d7c (diff) | |
download | rails-7034272354ad41dd4d1c90138a79e7f14ebc2bed.tar.gz rails-7034272354ad41dd4d1c90138a79e7f14ebc2bed.tar.bz2 rails-7034272354ad41dd4d1c90138a79e7f14ebc2bed.zip |
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r-- | actionpack/test/lib/controller/fake_models.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index c6726432ec..0faf8f3f9a 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -4,9 +4,27 @@ class Customer < Struct.new(:name, :id) extend ActiveModel::Naming include ActiveModel::Conversion + undef_method :to_json + def to_param id.to_s end + + def to_xml + "XML" + end + + def to_js + "JS" + end + + def errors + [] + end + + def destroyed? + false + end end class BadCustomer < Customer @@ -24,4 +42,8 @@ module Quiz id.to_s end end + + class Store < Question + end end + |