Pat and David -
Thanks for taking the time to explain this. Look forward to seeing
any_instance in rspec/mocks. And I will try to use it as little as
possible!
;-)
- Andy
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org
On Mar 20, 2011, at 11:38 PM, andyl wrote:
> OK - I got this working using mocha and the 'any_instance' method.
>
> A gist with working examples is here: https://gist.github.com/879029
>
> It looks like rspec mocks had an 'any_instance' method, but it was removed
> because it promoted 'bad pr
On Mar 20, 2011, at 9:38 PM, andyl wrote:
> OK - I got this working using mocha and the 'any_instance' method.
>
> A gist with working examples is here: https://gist.github.com/879029
>
> It looks like rspec mocks had an 'any_instance' method, but it was removed
> because it promoted 'bad pra
OK - I got this working using mocha and the 'any_instance' method.
A gist with working examples is here: https://gist.github.com/879029
It looks like rspec mocks had an 'any_instance' method, but it was removed
because it promoted 'bad practice'.
I'm curious to understand how 'any_instance' p
PS: I'm using rspec/rspec-mocks 2.5, Ubuntu 10.10, Ruby 1.8.7
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
I'm having trouble using stubs to intercept method calls in the object
constructor. Here's some code with a failing example:
class Test2
attr_accessor :msg
def initialize
@msg = sayhi
end
def sayhi
"hi"
end
end
describe Test2, "stubbing