Displaying 2 results from an estimated 2 matches for "__metaclass__".
2009 Jun 13
2
removing Mocha; 'spec spec' fails but the specific model file passes
...ns)$ spec spec
...................................c:/work/quizmaker_demo/spec/models/
user_spec.rb:86
User.authenticate(''nonexisting'', ''secret'').should be_nil
(rdb:1) s
c:/tools/ruby/ruby186/lib/ruby/gems/1.8/gems/mocha-0.9.5/lib/mocha/
class_method.rb:40
stubbee.__metaclass__.class_eval("def #{method}(*args, &block);
mocha.method_missing(:#{method}, *a
(rdb:1) c
2007 Mar 04
4
Rails functional testing and Mocha
...find
if any = self.class.any_instance_with_id( self.id)
any.expectations.each do |e|
method = stubba_method.new(stubba_object, e.method_name)
$stubba.stub(method)
e.mock = self.mocha
self.mocha.expectations << e
self.mocha.__metaclass__.send(:undef_method,
e.method_name) if self.mocha.__metaclass__.method_defined?
(e.method_name)
end
end
end
end
end
There''s also one or 2 places where i''ve made attributes writable/
readable on Expectation etc... to get this all to hold together.
Limit...