Skip to content

Instantly share code, notes, and snippets.

@damc-dev
Created March 11, 2015 12:59
Show Gist options
  • Save damc-dev/0985817b5eb8ded6c7dd to your computer and use it in GitHub Desktop.
Save damc-dev/0985817b5eb8ded6c7dd to your computer and use it in GitHub Desktop.
Bash: Creates and Initializes a RSpec Test
#!/bin/bash
# Title: mk-rspec.sh
# Description: Creates and Initializes a RSpec Test.
# Author: David McElligott
# Date: 03/11/2015
# Version: 0.1
# Usage: bash mk-rspec.sh $TEST_DIR
# Dependencies: Bundler
# ===============================================
TEST_DIR=$1
mkdir $TEST_DIR
cd $TEST_DIR
echo "source \"https://rubygems.org\"" >> ./Gemfile
echo "gem 'rspec', '~> 3.0'" >> ./Gemfile
bundle install --binstubs
bin/rspec --init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment