17 Feb '12, 7am

@kei_s 参考になるかわかりませんが、最近Pivotal Labsブログにこんな記事がありました。 / Test your Rake tasks!

There are several reasons why you should test your Rake tasks: Rake tasks are code and as such deserve testing. When untested Rake tasks have a tendency to become overly long and convoluted. Tests will help keep them in bay. As Rake tasks typically depend on your models, you (should) loose confidence in them if you don't have tests and are attempting refactorings. A problematic Rake task test Here is a Rake file... File: lib/tasks/bar_problematic.rake namespace :foo do desc "bake some bars" task bake_a_problematic_bar: :environment do puts '*' * 60 puts ' Step back: baking in action!' puts '*' * 60 puts Bar.new.bake puts '*' * 60 puts ' All done. Thank you for your patience.' puts '*' * 60 end end ...and its too simplistic spec: File: spec/tasks/bar_rake_problematic_spec.rb require 'spec_helper' require 'rake' describe 'foo namespace rake task' do describe 'foo:bake_a_prob...

Full article: http://pivotallabs.com/users/shagemann/blog/articles/1967...

Tweets

Rake tasks can take arguments

robots.thoughtbot.com 23 Feb '12, 10pm

February 23, 2012 Tagged: command line rake ruby shell how to Comments (View) How To Use Arguments In a Rake Task I came a...

[BLOGPOST] Google Calendar Helps You To Organize Your Everyday Tasks

[BLOGPOST] Google Calendar Helps You To Organiz...

domain.me 18 Feb '12, 10pm

Don’t you think it’s weird that there is no good alternative to Google Calendar ? I mean, the thing is online, perfectly w...

Giving a Rake Task Arguments #Ruby

robots.thoughtbot.com 23 Feb '12, 2pm

February 23, 2012 Tagged: ruby rake command line shell Comments (View) Giving a Rake Task Arguments I came across this tod...