shared_context :webapp_fixture do require 'sinatra/base' let(:rack_app) do Class.new(Sinatra::Base) do get '/page1' do "page1next page" end get '/page2' do 'page 2 content' end get '/elements' do <<-ELEMENTS a link
link in a form ELEMENTS end end end before :each do Capybara.app = rack_app end after do Capybara.reset! end end