Skip to content

Instantly share code, notes, and snippets.

@unders
Created August 9, 2008 07:51
Show Gist options
  • Save unders/4659 to your computer and use it in GitHub Desktop.
Save unders/4659 to your computer and use it in GitHub Desktop.
desc "Push design to spec"
task :design do
require 'yaml'
specs = YAML::load_file './spec/design.yml'
specs.each_pair do |describe, specs_array|
spec_file = File.new("./spec/#{describe.downcase.gsub(/ /, '_')}_spec.rb", 'w')
spec_file.puts <<-END
require File.dirname(__FILE__) + '/spec_helper'
describe "#{describe}" do
#{specs_array.map {|spec| " it \"#{spec}\"\n" }}
end
END
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment