The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Running the Rspec spec task as the default task in Rails

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Kurt Schrader

Posts: 80
Nickname: kschrader
Registered: Feb, 2008

Kurt Schrader is an entrepreneur and a ruby programmer.
Running the Rspec spec task as the default task in Rails Posted: Mar 4, 2008 5:19 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Kurt Schrader.
Original Post: Running the Rspec spec task as the default task in Rails
Feed Title: Schrade.Blog
Feed URL: http://kurt.karmalab.org/atom.xml
Feed Description: Tech and Business Ramblings by Kurt Schrader
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Kurt Schrader
Latest Posts From Schrade.Blog

Advertisement

Whenever I start a new Rails project, one of the first things I do is install Rspec and delete the Rails default test directory. Even with that directory missing, however, Rails continues to waste my time by trying to run its various testing tasks.

To make it stop, just add the following:

Rake::Task[:default].prerequisites.clear
task :default => :spec

to the bottom of the Rakefile in the root application directory.

Obviously, if you want to have a default task other than spec, just change the right side of the second line to whatever task you want it to run.

Read: Running the Rspec spec task as the default task in Rails

Topic: The Novelty Curve from David Armano This is a great way to... Previous Topic   Next Topic Topic: Latest book - Rainbows End

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use