Sha256: 8fa3af5eb45788a57f740d03bb62020c3864b1e7f8c68e07216d8cd90543ce09

Contents?: true

Size: 748 Bytes

Versions: 4

Compression:

Stored size: 748 Bytes

Contents

require 'capybara/spec/test_app'

class ExtendedTestApp < TestApp#< Sinatra::Base
  set :environment, :production # so we don't get debug info that makes our test pass!
  
  get %r{/redirect_to/(.*)} do
    redirect params[:captures]
  end
  
  get '/host' do
    "current host is #{request.host}:#{request.port}, method get"
  end
  
  get '/form_with_relative_action_to_host' do
    %{<form action="/host" method="post">
       <input type="submit" value="submit" />
      </form>}
  end
  
  get '/relative_link_to_host' do
    %{<a href="/host">host</a>}
  end
  
  post '/host' do
    "current host is #{request.host}:#{request.port}, method post"
  end
end

if __FILE__ == $0
  Rack::Handler::Mongrel.run ExtendedTestApp, :Port => 8070
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capybara-mechanize-0.2.7 lib/capybara/spec/extended_test_app.rb
capybara-mechanize-0.2.6 lib/capybara/spec/extended_test_app.rb
capybara-mechanize-0.2.5 lib/capybara/spec/extended_test_app.rb
capybara-mechanize-0.2.4 lib/capybara/spec/extended_test_app.rb