Sha256: 32df765d3bfbf22d0b5fb79a097072eb86c45e65706ae893ad6c4a0e654b4f63

Contents?: true

Size: 778 Bytes

Versions: 15

Compression:

Stored size: 778 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))

describe "Webrat" do
  it "should visit pages" do
    response = visit "/"
    response.should contain("Webrat Form")
  end

  it "should submit forms" do
    visit "/"
    fill_in "Text field", :with => "Hello"
    check "TOS"
    select "January"
    click_button "Test"
  end

  it "should follow internal redirects" do
    response = visit "/internal_redirect"
    response.status.should == 200
    response.should contain("Webrat Form")
  end
  
  it "should check the value of a field" do
    visit "/"
    field_labeled("Prefilled").value.should == "text"
  end

  it "should not follow external redirects" do
    response = visit "/external_redirect"
    response.status.should == 302
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
adva-0.3.2 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.3.1 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.3.0 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.2.4 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.2.3 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.2.2 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.2.1 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.2.0 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.1.4 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.1.3 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.1.2 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.1.1 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.1.0 test/webrat/spec/integration/merb/spec/webrat_spec.rb
adva-0.0.1 test/webrat/spec/integration/merb/spec/webrat_spec.rb
integrity-0.1.9 vendor/webrat/spec/integration/merb/spec/webrat_spec.rb