Sha256: 17dc7bae975ae99139e8486aa0f7fc2f6587a30abefe037e567973fbf4b0b191

Contents?: true

Size: 784 Bytes

Versions: 13

Compression:

Stored size: 784 Bytes

Contents

require File.dirname(__FILE__) + "/spec_helper"

describe "Webrat's Mechanize mode" do
  it "should work" do
    response = visit("http://localhost:9292/")
    response.should contain("Hello World")
  end

  it "should follow redirects" do
    response = visit("http://localhost:9292/internal_redirect")
    response.should contain("Redirected")
  end

  it "should follow links"

  it "should submit forms" do
    visit "http://localhost:9292/form"
    fill_in "Email", :with => "albert@example.com"
    response = click_button "Add"

    response.should contain("Welcome albert@example.com")
  end

  it "should not follow external redirects" do
    pending do
      response = visit("http://localhost:9292/external_redirect")
      response.should contain("Foo")
    end
  end
end

Version data entries

13 entries across 13 versions & 7 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/spec/integration/mechanize/spec/mechanize_spec.rb
indirect-webrat-0.7.5 spec/integration/mechanize/spec/mechanize_spec.rb
indirect-webrat-0.7.4 spec/integration/mechanize/spec/mechanize_spec.rb
webrat-0.7.3 spec/integration/mechanize/spec/mechanize_spec.rb
jbd-webrat-0.7.2.rails3 spec/integration/mechanize/spec/mechanize_spec.rb
webrat-0.7.2 spec/integration/mechanize/spec/mechanize_spec.rb
webrat-0.7.2.beta.2 spec/integration/mechanize/spec/mechanize_spec.rb
mutle-webrat-0.7.2.beta.1 spec/integration/mechanize/spec/mechanize_spec.rb
thoughtbot-webrat-0.7.2.pre spec/integration/mechanize/spec/mechanize_spec.rb
webrat-0.7.2.beta.1 spec/integration/mechanize/spec/mechanize_spec.rb
honkster-webrat-0.7.1.2 spec/integration/mechanize/spec/mechanize_spec.rb
honkster-webrat-0.7.1.1 spec/integration/mechanize/spec/mechanize_spec.rb
webrat-0.7.1 spec/integration/mechanize/spec/mechanize_spec.rb