Skip to content

Instantly share code, notes, and snippets.

@sigmike
Created May 8, 2009 19:57
Show Gist options
  • Select an option

  • Save sigmike/108977 to your computer and use it in GitHub Desktop.

Select an option

Save sigmike/108977 to your computer and use it in GitHub Desktop.
require 'sinatra_app'
require 'hpricot'
# RSpec matchers
require 'spec/expectations'
# Required for RSpec to play nice with Sinatra/Test
require 'spec/interop/test'
require "rack/test"
require 'haml'
World do
def app
@app = Rack::Builder.new do
run Sinatra::Application
end
end
include Rack::Test::Methods
end
Test::Unit::TestCase.send :include, Rack::Test
set :environment, :test
When /^I go to the website$/ do
get '/'
end
Then /^there should be a link to the vote page$/ do
last_response.body.should include("layout")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment