[Locomotive-users] Rspec

Ryan Raaum ryan.raaum at gmail.com
Wed Oct 4 18:24:44 GMT 2006


On 10/4/06, Bolo Michelin <malavoi at gmail.com> wrote:
>
> Hello,
>
> i am testing rspec plugin http://rspec.rubyforge.org/ . When i am runnig
> the spec with this command
> pc-mq-dsi3:~/Documents/Coding-Dev/expay_corporate bmichelin$ spec
> spec/models/faq_spe c.rb
>
> require File.dirname(__FILE__) + '/../spec_helper'
>
> context "une faq en général" do
>   def setup
>     @faq = Faq.new
>   end
>
>   specify "devras être invalide sans question" do
>     @faq.should_not_be_valid
>     @faq.question_fr = 'le_titre_de_la_question'
>     @faq.should_be_valid
>   end
> end
>
> i have this erro message
>
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/errors.rb:94:in `check': cannot rollback - no
> transaction is active (SQLite3::SQLException)


It appears there is an incompatibility between rspec and transactional
fixtures.

See comments towards the bottom of this post:
http://www.lukeredpath.co.uk/2006/8/29/developing-a-rails-model-using-bdd-and-rspec-part-1

and see the fixtures docs on how to turn transactional fixtures on/off:
http://rubyonrails.org/api/classes/Fixtures.html

-r

        from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/resultset.rb:76:in `check'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/resultset.rb:68:in `commence'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/resultset.rb:61:in `initialize'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/statement.rb:158:in `execute'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/database.rb:211:in `execute'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/database.rb:186:in `prepare'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/database.rb:210:in `execute'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/sqlite3-
> ruby-1.1.0/lib/sqlite3/database.rb:620:in `rollback'
>          ... 13 levels...
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/rspec-
> 0.6.4/lib/spec/runner/context_runner.rb:25:in `run'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/rspec-
> 0.6.4/lib/spec/runner/context_runner.rb:24:in `run'
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/rspec-
> 0.6.4/bin/spec:18
>         from
> /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/bin/spec:18
>
> Thanks
>
> --
> Bolo Michelin
> web: http://www.independza.com
> _______________________________________________
> Locomotive-users mailing list
> Locomotive-users at lists.raaum.org
> http://lists.raaum.org/mailman/listinfo/locomotive-users
>
>
>


-- 
Ryan Raaum
http://raaum.org
http://locomotive.raaum.org -- Self contained one-click Rails for Mac OS X
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://one.textdrive.com/pipermail/locomotive-users/attachments/20061004/02eacea5/attachment-0001.htm


More information about the Locomotive-users mailing list