test/mock/dummy_class.rb in rubyless-0.7.0 vs test/mock/dummy_class.rb in rubyless-0.8.0

- old
+ new

@@ -16,11 +16,13 @@ :id => {:class => Number, :method => :zip}, :name => String, :foo => :bar, [:width, {:mode => String, :type => String, 'nice' => Boolean}] => String, [:kind_of?, Class] => Boolean, - [:kind_of?, String] => {:method => 'is_like?', :class => Boolean} + [:kind_of?, String] => {:method => 'is_like?', :class => Boolean}, + :author => (Proc.new do |h, s| {:method => 'author', :class => Dummy} end) + #:author => {:method => 'author', :class => Dummy} safe_context :spouse => 'Dummy', :husband => {:class => 'Dummy', :context => {:clever => 'no'}} safe_attribute :age, :friend_id, :log_at, :format @@ -78,9 +80,13 @@ nil end def zip 10 + end + + def author + Dummy.new('bob') end end class SubDummy < Dummy end