[rspec-users] Story adapter and SQLite Was:What command to run all stories?

Ed Howland ed.howland at gmail.com
Thu Nov 15 14:38:33 EST 2007


On Nov 15, 2007 12:22 PM, David Chelimsky <dchelimsky at gmail.com> wrote:
> On Nov 15, 2007 11:58 AM, Ed Howland <ed.howland at gmail.com> wrote:
> > 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.
>
> Why is this example engaging any sort of database? It shouldn't need to.

No db is used. I don't know why ActiveRecordSafetyListener is registered.

>
>
> >
> > 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
> > >
> > >   As an accountant
> > >   I want to add numbers
> > >   So that I can count beans
> > >
> > > Scenario: add one plus one
> > >
> > >   Given an addend of 1 (PENDING)
> > >   And an addend of 1 (PENDING)
> > >
> > >   When the addends are added (PENDING)
> > >
> > >   Then the sum should be 2 (PENDING)
> > >   And the corks should be
> > > popped/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb:94:in
> > > `check': SQL logic error or missing database (SQLite3::SQLException)
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:76:in
> > > `check'
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:68:in
> > > `commence'
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:61:in
> > > `initialize'
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb:163:in
> > > `new'
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb:163:in
> > > `execute'
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:212:in
> > > `execute'
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:187:in
> > > `prepare'
> > >         from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:211:in
> > > `execute'
> > >          ... 13 levels...
> > >         from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb:39:in
> > > `each'
> > >         from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb:39:in
> > > `run_stories'
> > >         from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner.rb:41:in
> > > `register_exit_hook'
> > >         from stories/additions/addition.rb:3
> > > This last part is happening in the at_exit part of Test:Unit
> > >
> > > Also, I don't understand why the scenario's are pending.
> > >
> > > Thanks
> > > Ed
> > >
> > >
> > >
> > > --
> > > Ed Howland
> > > http://greenprogrammer.blogspot.com
> > > "The information transmitted is intended only for the person or entity
> > > to which it is addressed and may contain proprietary, confidential
> > > and/or legally privileged material. Any review, retransmission,
> > > dissemination or other use of, or taking of any action in reliance
> > > upon, this information by persons or entities other than the intended
> > > recipient is prohibited. If you received this in error, please contact
> > > the sender and delete the material from all computers."
> > >
> >
> >
> >
> > --
> > Ed Howland
> > http://greenprogrammer.blogspot.com
> > "The information transmitted is intended only for the person or entity
> > to which it is addressed and may contain proprietary, confidential
> > and/or legally privileged material. Any review, retransmission,
> > dissemination or other use of, or taking of any action in reliance
> > upon, this information by persons or entities other than the intended
> > recipient is prohibited. If you received this in error, please contact
> > the sender and delete the material from all computers."
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> >
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Ed Howland
http://greenprogrammer.blogspot.com
"The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from all computers."


More information about the rspec-users mailing list