Skip to content

Instantly share code, notes, and snippets.

@evanfarrar
Created December 2, 2008 23:01
Show Gist options
  • Save evanfarrar/31307 to your computer and use it in GitHub Desktop.
Save evanfarrar/31307 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'trollop'
context = opts[:context]
shoulda = ''
$stdin.each_line do |line|
shoulda << ' '+line.gsub(/def test_#{context}_should_(.*)/,'should "\1" do').gsub('_',' ')
end
puts " context \"#{context}\" do"
puts shoulda
puts " end"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment