diff options
Diffstat (limited to 'actionpack/test/template/prototype_helper_test.rb')
-rw-r--r-- | actionpack/test/template/prototype_helper_test.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index a7a1bc99f3..acbf311212 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -1,10 +1,15 @@ require 'abstract_unit' +require 'active_model' -Bunny = Struct.new(:Bunny, :id) -Bunny.extend ActiveModel::Naming +class Bunny < Struct.new(:Bunny, :id) + extend ActiveModel::Naming + include ActiveModel::Conversion +end class Author extend ActiveModel::Naming + include ActiveModel::Conversion + attr_reader :id def save; @id = 1 end def new_record?; @id.nil? end @@ -15,6 +20,7 @@ end class Article extend ActiveModel::Naming + include ActiveModel::Conversion attr_reader :id attr_reader :author_id def save; @id = 1; @author_id = 1 end |