Skip to content

Instantly share code, notes, and snippets.

@benlovell
Created April 30, 2009 16:37
Show Gist options
  • Save benlovell/104530 to your computer and use it in GitHub Desktop.
Save benlovell/104530 to your computer and use it in GitHub Desktop.
ENV['RACK_ENV'] = 'test'
app_file = File.join(File.dirname(__FILE__), *%w[.. .. app.rb])
require app_file
Sinatra::Application.app_file = app_file
require 'spec/expectations'
require 'webrat'
Webrat.configure do |config|
config.mode = :sinatra
end
World do
session = Webrat::SinatraSession.new
session.extend(Webrat::Matchers)
session.extend(Webrat::HaveTagMatcher)
session
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment