Skip to content

Instantly share code, notes, and snippets.

@leandroh
Created April 1, 2009 01:52
Show Gist options
  • Save leandroh/88499 to your computer and use it in GitHub Desktop.
Save leandroh/88499 to your computer and use it in GitHub Desktop.
#!/opt/local/bin/ruby
class Dir
def self.create(dir, files=[])
Dir.mkdir(dir)
Dir.chdir(dir) do
files.collect { |f| File.new(f, 'w+') } if not files.empty?
yield if block_given?
end
end
end
Dir.create('features', 'test.feature') do
Dir.create('step_definitions', 'test_steps.rb')
Dir.create('support', 'env.rb')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment