[mocha-developer] Mocha + Selenium-on-rails loading problem ?
jamesmead44 at gmail.com
Mon Sep 18 13:17:49 EDT 2006
On 18/09/06, Peter Fitzgibbons <peter.fitzgibbons at gmail.com> wrote:
> I'm waiting on my subscription to the mailing list. Until then, I wanted
> to send you this.
I just approved it - somehow it got sucked into my spam filter - sorry for
I need to stub two class methods before a selenium call.
> The .rsel is :
> require 'mocha'
> setup :fixtures => :sales_config_works
> open "/"
> The Selenium test runner result is :
> undefined method `stubs' for SalesConfigWork:Class
> Extracted source (around line *#0*):
> 1: require 'mocha'
> 3: SalesConfigWork.stubs(:load_work_data)
> RAILS_ROOT: ./script/../config/..
> I understand this might be a stretch to ask; what do you think is
> happening here ?
> Thanks for your time!
You need to include the Stubba part of Mocha if you want to stub classes and
You need to make sure these are required after the Rails Test::Unit stuff
which normally gets loaded in test_helper.rb when it requires test_help.rb.
I haven't tried Mocha with Selenium-on-Rails, so let me know how it goes.
Hope that helps,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mocha-developer