[rspec-devel] Rpec with Locomo

Bolo Michelin malavoi at gmail.com
Thu Oct 12 16:56:00 EDT 2006


Nobody ?
my spec.file
require File.dirname(__FILE__) + '/../spec_helper'
module FaqSpecHelper
  def validate_faq_attributes
    { :question_fr  => 'titre de la question',
      :response_fr  => 'reponse de la question'}
  end
end

context "une faq en général" do
  def setup
    @faq = Faq.new
  end

  specify "devras être invalide sans question" do
    #doit avoir une réponse valide
    @faq.reponse_fr = 'le_titre_de_la_question'
    @faq.should_not_be_valid
    @faq.errors.on(:question_fr).should_equal "est necessaire"
    @faq.question_fr = 'le_titre_de_la_question'
    @faq.should_be_valid
  end

  specify "devras être invalide sans réponse" do
    #doit avoir une question valide
     @faq.question_fr = 'le_titre_de_la_question'
     @faq.should_not_be_valid
     @faq.errors.on(:reponse_fr).should_equal "est necessaire"
     @faq.reponse_fr = 'le_titre_de_la_question'
     @faq.should_be_valid
   end
end


2006/10/12, Bolo Michelin <malavoi at gmail.com>:
>
> Hello
>
> I turn off transactional_fixture
> self.use_transactional_fixtures = false
>
> But when i tested rcpec have this error
>
> pc-mq-dsi3:~/Documents/Coding-Dev/expay_corporate bmichelin$ spec
> spec/models/faq_spec.rb
>
>
> /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)
>
> thanks
>
> --
> Bolo Michelin
> web: http://www.independza.com




-- 
Bolo Michelin
web: http://www.independza.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20061012/db2821c3/attachment.html 


More information about the rspec-devel mailing list