15 Mar '13, 5pm

problems testing 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_problema...

Full article: http://pivotallabs.com/how-i-test-rake-tasks/

Tweets

rational - Rake -- Ruby Make:

rake.rubyforge.org 16 Mar '13, 10am

It started yesterday. I was helping a coworker fix a problem in one of the Makefiles we use in our project. Not a particul...

Using a Raspberry Pi as an Information Radiator

Using a Raspberry Pi as an Information Radiator

pivotallabs.com 15 Mar '13, 11am

We have found the Raspberry Pi to be a cost-effective replacement for the Mac minis that we use in our office to drive TVs...

@integralist Parsing ambiguities around calling...

rake.rubyforge.org 13 Mar '13, 10am

Prior to version 0.8.0, rake was only able to handle command line arguments of the form NAME=VALUE that were passed into R...

On @dribbble: "Pivotal Labs is hiring a Visual ...

pivotallabs.com 12 Mar '13, 10pm

Pivotal Labs is a recognized leader in agile software development practices. We build consumer and enterprise web and mobi...