Sha256: f2565b1eede858e9caf2196dbaefa96705521792df860844f82aed25ea41a5ff

Contents?: true

Size: 1.32 KB

Versions: 2

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 "WatiRspec" 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 'watirspec 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

2 entries across 2 versions & 1 rubygems

Version Path
watirspec-0.1.9.1 templates/project/spec/dummy_spec.rb
watirspec-0.1.8 templates/project/spec/dummy_spec.rb