Sweet! We're on an r&d project, so we'll probably move to edge...
- Korny
On Wed, Apr 16, 2008 at 3:53 PM, Ben Mabey <[EMAIL PROTECTED]> wrote:
>
> Korny Sietsma wrote:
> > Hi folks - I'm trying to build a rake task to run our plain-text
> > stories, both from a normal build and from our continuous integration
> > server.
> >
> > However, I'm having a problem - running all.rb doesn't return any sort
> > of success/failure - so a broken story doesn't indicate to Cruise
> > Control that the build is broken.
> >
> > Currently the rake task is:
> > desc "Run all stories"
> > task :stories do
> > output = "#{ARTIFACT_DIR}/doc/rspec/story_results.txt"
> > ruby "#{RAILS_ROOT}/stories/all.rb"
> > end
> >
> > and all.rb calls story files which do the standard sort of thing:
> > ----
> > require File.dirname(__FILE__) + "/helper"
> >
> > with_steps_for(:stuff, :morestuff) do
> > run_local_story "my_first_story", :type => RailsStory
> > end
> > ----
> >
> > I'm going to try switching to Kyle Hargrave's story runner stuff - but
> > it's unclear to me if this has any sort of success/fail indicator
> > either...
> >
> > Any suggestions on how to get the above to return a failure code, or
> > throw an exception? I've seen stuff in the code relating to
> > Spec::Story::World.errors() - but I can't seem to work out how to
> > access this.
> >
> > (Oh, and I'm very new to rspec stories, and somewhat new to rake
> > tasks, so forgive me if I'm missing something obvious)
> >
> > - Korny
> >
> >
>
>
> Korny,
> The exit code for the story runner does not work in the current (1.1.3)
> version. I made a patch to add that functionality so our CI would be
> happy and it is already in rspec edge and will be in 1.1.4. You can
> either grab my patch or switch to edge rspec. My patch is here:
>
> http://rspec.lighthouseapp.com/projects/5645/tickets/228-story-runner-exit-code
>
> -Ben
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Kornelis Sietsma korny at my surname dot com
kornys at gmail dot com on google chat -- kornys on skype
"we do what we must, because we can"
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users