Skip to content

Instantly share code, notes, and snippets.

@Tasha25
Created October 22, 2013 15:59
Show Gist options
  • Save Tasha25/7103282 to your computer and use it in GitHub Desktop.
Save Tasha25/7103282 to your computer and use it in GitHub Desktop.
This will help to configure rspec in documentation
# Configure Rspec to print nice
RSpec.configure do |config|
# Use color in STDOUT
config.color_enabled = true
# Use color not only in STDOUT but also in pagers and files
config.tty = true
# Use the specified formatter
config.formatter = :documentation # :progress, :html, :textmate
# immediately stop running upon first failure
config.fail_fast = true
end
# Example of usage. To set up you will have your folder of project called piglatin in it you have
#another folder called spec.
# in spec you have "pig_latin_spec.rb" and "spec_helper.rb"
# In "spec_helper.rb" you have these two on top: require 'rspec' and require 'pry'
# in "pig_latin_spec.rb" on the top is
# require 'rspec'
# require_relative("spec_helper")
# require_relative("../pig_latin")
# in pig_latin.rb we will put our code. it was two levels up so we had to go to where
#the file was
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment