Displaying 4 results from an estimated 4 matches for "teardown_stubs".
2006 Dec 15
0
Fwd: Re: [HOWTO] Edgemocha
...e Mocha outside a
testing framework. Your example illustrates a couple of the problems
of using Mocha outside a testing framework - when do expectations get
verified and when do stubbed classes get put back to their original
state. You need to decide when to trigger calls to e.g. verify_stubs()
and teardown_stubs().
Probably better to post stuff like this to the Mocha developer list
(see footer) rather than ruby-talk.
--
James.
http://blog.floehopper.org
http://rubyforge.org/mailman/listinfo/mocha-developer
2006 Sep 18
2
Mocha + Selenium-on-rails loading problem ?
Hello All,
I need to stub two class methods before a selenium call.
The .rsel is :
require ''mocha''
SalesConfigWork.stubs(:load_work_data)
SalesConfigWork.stubs(:delete_work_data)
setup :fixtures => :sales_config_works
open "/"
The Selenium test runner result is :
undefined method `stubs'' for SalesConfigWork:Class
Extracted source (around line *#0*):
2006 Sep 13
2
Problem with RSpec and Mocha/Stubba
I''ve recently upgraded to the latest versions of Mocha and RSpec
(0.3.2 and 0.6.3 respectively) and I''m no longer able to use Mocha/
Stubba with RSpec. Its actually only Stubba I''m interested in as I
use RSpec''s built-in mocking library.
I require stubba in my spec file but whenever I try and run my spec
it fails with the error:
Unintialized constant
2007 Mar 12
10
using mocha with rspec
Hi folks.
I''ve just started using rspec and I have to say it''s very nice. The
thing is, I prefer mocha''s mocking dialect. So I thought a simple
require ''mocha'' would set me up.
Unfortunately, rspec does all its goodness using do/end blocks in
anonymous classes, so it wasn''t quite that obvious.
Anyway, here is the incantation I ended up