Skip to content

Commit

Permalink
selenium example less brittle to rspec version changes :)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmabey committed Dec 11, 2008
1 parent 5568478 commit 1311d3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/selenium/features/search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Feature: Search
Scenario: Find what I'm looking for
Given I am on the Google search page
When I search for "rspec"
Then I should see a link to "RSpec-1.1.11: Overview":http://rspec.info/
Then I should see a link to http://rspec.info/
5 changes: 2 additions & 3 deletions examples/selenium/features/step_definitons/stories_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def search(text)
@page.search(query)
end

Then /I should see a link to "(.*)":(.*)/ do |text, expected_url|
observed_url = @browser.get_attribute("link=#{text}@href")
observed_url.should == expected_url
Then /I should see a link to (.*)/ do |expected_url|
@browser.is_element_present("css=a[href='#{expected_url}']").should be_true
end

0 comments on commit 1311d3b

Please sign in to comment.