Created
April 1, 2009 01:52
-
-
Save leandroh/88499 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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