Skip to content

Instantly share code, notes, and snippets.

@vnegrisolo
Last active September 3, 2016 14:54
Show Gist options
  • Save vnegrisolo/afac59bd08be9c7de00e to your computer and use it in GitHub Desktop.
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
#!/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