Skip to content

Instantly share code, notes, and snippets.

@mikeebert
Created June 19, 2012 02:43
Show Gist options
  • Select an option

  • Save mikeebert/2952016 to your computer and use it in GitHub Desktop.

Select an option

Save mikeebert/2952016 to your computer and use it in GitHub Desktop.
Sinatra Rspec spec_helper (also using cucumber)
require File.join(File.expand_path(File.dirname(__FILE__)), '/../', 'foundry')
require 'sinatra'
require 'rack/test'
set :environment, :test
#specify that the app is a Sinatra app
def app
Sinatra::Application
end
#make Rack::Text available to all spec contexts
RSpec.configure do |config|
config.include Rack::Test::Methods
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment