Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails + Rake: How to simulate running of rake task to see if it works?

Is there a way to do a test run of a rake task? If so what is the command to do it? I don't want to actually touch the development database since my task manipulates the data.

like image 327
bigpotato Avatar asked Jun 06 '13 21:06

bigpotato


1 Answers

Yes you can actually run bundle exec rake COMMAND -n

Having a look at rakes help we can see it here.

# rake --help
--dry-run Do a dry run without executing actions.
like image 114
Barbared Avatar answered Oct 30 '22 22:10

Barbared