[rspec-users] [Cucumber] - default rake task
aidy lewis
aidy.lewis at googlemail.com
Tue Jan 13 13:43:50 EST 2009
On 13/01/2009, Matt Wynne <matt at mattwynne.net> wrote:
>
> On 13 Jan 2009, at 18:02, aidy lewis wrote:
>
>
> > Hi,
> >
> > I have a Rake problem.
> >
> > I would like the default task to run after :features.
> >
> > Curently it doesn't when :features fails. Could you please help?
> >
> >
> > <RAKE>
> > require 'cucumber/rake/task'
> >
> > def send_dcs_email_report(path_to_story_results)
> > ###
> > end
> >
> > Cucumber::Rake::Task.new("features", "All features in
> IE") do |t|
> > t.cucumber_opts = "--format html --out story-results.html"
> > end
> >
> > task :default => :features do
> > path_to_story_results =
> > File.expand_path(File.dirname(".")).gsub("/", "\\") +
> > "\\story-results.html"
> > send_dcs_email_report(path_to_story_results)
> > end
> > </RAKE>
> >
> > Thanks
> >
> > Aidy
> >
>
> You could do something like this:
>
> task :default do
> begin
> Rake::Task[:features].invoke
> ensure
> path_to_story_results =
> File.expand_path(File.dirname(".")).gsub("/", "\\") +
> "\\story-results.html"
> send_dcs_email_report(path_to_story_results)
> end
> end
>
> does that work?
>
Like a dream Matt.
Thanks
Aidy
More information about the rspec-users
mailing list