Sha256: eba90da1421ed0a2f458ce7206df0d1a56ff8d168a6c45cd799aae6b39c8bca0

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

# this is a fully working dummy spec file which you can run to see if
# your configuration is correct and everything is working as expected

describe "WatirSplash" do

  it "has the browser window opened" do
    url.should == "about:blank"
  end

  it "has easy access to ApplicationHelper methods" do
    # ApplicationHelper#helper_method_one will be executed
    helper_method_one.should == "one"
    # ApplicationHelper#has_second_method? will be execute
    should have_second_method
    # ApplicationHelper#correct? method will be execute
    should_not be_correct
  end

  it "fails the example and makes a screenshot of the browser" do
    false.should be_true
  end

  it "is in pending status" do
    goto "http://google.com"
    title.should == "Google"
    text_field(:name => "q").set "Bing"
    search_button = button(:name => "btnG")
    search_button.should exist
    search_button.should be_visible
    search_button.click
    text.should include("Bing")
    pending "this is a known 'bug'" do
      title.should == "Bing"
    end
  end

  it "has also access to global methods" do
    pending "it fails as long as there's not executed 'watirsplash generate_common' command
and ui-test-common is not loaded by this project" do
      new_global_method.should == "it just works"
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watirsplash-0.1.9 templates/project/spec/dummy_spec.rb