test/mock/dummy_class.rb in rubyless-0.8.0 vs test/mock/dummy_class.rb in rubyless-0.8.1
- old
+ new
@@ -8,20 +8,25 @@
attr_reader :name
safe_method [:ancestor?, Dummy] => Boolean
safe_method :parent => {:class => 'Dummy', :special_option => 'foobar'},
- :children => ['Dummy'],
+ :genitors => ['Dummy'],
+ :children => {:class => ['Dummy'], :nil => true},
:project => 'Dummy',
:image => 'Dummy',
: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},
- :author => (Proc.new do |h, s| {:method => 'author', :class => Dummy} end)
+ # helper, receiver, signature
+ :author => (Proc.new do |h, r, s| {:method => 'author', :class => Dummy} end)
#:author => {:method => 'author', :class => Dummy}
+
+ # just to test Proc.call
+ safe_method :proc_test => Proc.new {|h, r, s| {:class => String, :method => '""', :h => h, :r => r, :s => s}}
safe_context :spouse => 'Dummy',
:husband => {:class => 'Dummy', :context => {:clever => 'no'}}
safe_attribute :age, :friend_id, :log_at, :format