Skip to content

Instantly share code, notes, and snippets.

@EliseFitz15
Last active November 12, 2015 17:21
Show Gist options
  • Save EliseFitz15/afe8eced5c7c68dc2171 to your computer and use it in GitHub Desktop.
Save EliseFitz15/afe8eced5c7c68dc2171 to your computer and use it in GitHub Desktop.
setting-uprspec-in-sinatra

#Setting Up RSpec

  • gem install rspec
  • In the project root set up the following file structure:
    • spec/lib/class_spec.rb
    • lib/class.rb goes in lib
  • Configure RSpec for color tests. In the root folder touch .rspec and insert "--color"
  • To reference our classes, tests files need this at the top require_relative '../../lib/class.rb'
  • To run the test type rspec spec from the root directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment