[rspec-users] Speccing a rake task

dph dph at smartmonkey.org
Fri Oct 12 13:38:25 EDT 2007


Greetings,

I'm writing a custom rake task, and I'd like to write an assosciated spec for it.

Does anyone have an example spec for a rake task?

I've seen some examples on the web that use these before blocks:
  before(:each) do
    @rake = Rake::Application.new
    Rake.application = @rake
  end

And use 
  @rake["db:user_migration"].invoke

To invoke the task.  But this doesn't seem to work for me.

Thanks for the help!

dan


More information about the rspec-users mailing list