Created
October 2, 2014 16:03
-
-
Save stujo/5cced674f6320963b08e to your computer and use it in GitHub Desktop.
Todo Helper Rakefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Generate a migration timestamp' | |
task 'mtimestamp' do | |
puts Time.now.strftime("%Y%m%d%H%M%S") | |
end | |
desc 'Test Drive Code' | |
task "driver" do | |
puts "ADD #{`ruby todo.rb add Bake a delicious blueberry-glazed cheesecake`}" | |
puts "LIST #{`ruby todo.rb list`}" | |
# Get the last ID | |
id = Task.last.id | |
if id > 0 | |
complete_results = `ruby todo.rb complete #{id}` | |
puts "COMPLETE #{complete_results}" | |
delete_results = `ruby todo.rb delete #{id}` | |
puts "DELETE #{delete_results}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment