Displaying 3 results from an estimated 3 matches for "activerecordsafetylistener".
2008 May 08
7
Rspec Stories / Selenium Nightmare
...have the functionality).
Selenium-core as part of a rails plugin looked nice but did not seem to
fit with rspec stories. So I went the Selenium-rc route.
Since Selenium uses a separate instance of rails
(http://www.nabble.com/stories-with-selenium-and-the-db-td16190686.html)
I had to turn off the ActiveRecordSafetyListener used in rspec to make
sure the db writes committed.
Which in turn left me having to manually cleanup my selenium stories :(
So that required writing a new, rather gritty scenario listener which
dealt with the cleaning operation. It has to do lots of horrible things
like remove all listeners for a...
2007 Nov 15
2
Story adapter and SQLite Was:What command to run all stories?
Hi, by switching to MySQL from SQLite, it fixed the problem. I ran
rdebug on it and it is trying to call
I ActiveRecord::Base.connection.begin_db_transaction. from
ActiveRecordSafetyListener.scenario_started. I don''t think SQLLite
likes transactions.
Ed
On Nov 15, 2007 10:56 AM, Ed Howland <ed.howland at gmail.com> wrote:
> If I run the story stand-alone, I get:
> ruby stories/additions/addition.rb
> Running 2 scenarios:
>
> Story: simple addition
>
&...
2008 Mar 20
1
stories with selenium and the db
Hi all
Tonight I wanted to test out selenium in a story to test some ajax
stuff on a page.
After struggling for an hour or two with disappearing database objects
I found the solution in a blog post by Kerry Buckley.
with the comment included it reads:
# Don''t add an ActiveRecordSafetyListener, or it''ll roll stuff back
class Spec::Story::Runner::ScenarioRunner
def initialize
@listeners = []
end
end
(the above code belongs in the story helper file, or more specific,
for me in my selenium helper file as not every story uses selenium)
Ok, that worked, but I don'&...