peter.fitzgibbons-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-15 20:47 UTC
Using Selenium with a mock-method on associated Model ???
Hello all,
I have a Selenium test calling |open|/sales/approve_activity|
The data list gathered for this page requires an external database call
to a stored procedure to fill a "work table" that is read for the data
on the page (SQL 2000).
I have the call wrapped in a single-line method.
During my functional test, I mock-disable the stored procedure call, as
the "work table" is fillied via fixture.
class Sales < ActiveRecord::Base
def self.load_work_data
puts "mock called sp_load_sales_work_table"
end
end
I placed this same code into a .rsel partial and includePartial at the
top of my .sel test.
This works A-OK in the fixture. It apparently doesn''t work at all in
the Selenium call.
Where should this mock-class be located? And/or when should I call it
for use with a Selenium test ?
Thanks all.
--
------------------------------
Apple MacBook. Black. It''s the new White!
------------------------------
Peter Fitzgibbons
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
