Last active
September 3, 2016 14:54
-
-
Save vnegrisolo/afac59bd08be9c7de00e to your computer and use it in GitHub Desktop.
Create a ruby file and it's test for a small proof of concept
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
#!/bin/sh | |
name=$1; | |
if [ -z "${name}" ]; then | |
echo 'usage ./small-ruby <name>'; | |
exit 1; | |
fi | |
mkdir ${name} | |
cd ${name} | |
touch "${name}.rb" | |
echo "--color" > ".rspec" | |
mkdir spec | |
echo "require 'spec_helper'\n\ndescribe '${name}' do\nend" > "spec/${name}_spec.rb" | |
echo "Dir['*.rb'].each { |f| require_relative \"../#{f}\" }" > "spec/spec_helper.rb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment