Skip to content

Commit

Permalink
example tweaks for os x
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed May 9, 2008
1 parent a68f6b3 commit b45ade5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/web/run_stories.story
Expand Up @@ -7,4 +7,4 @@ Story: Run Stories
Given I am on the search page
And I have entered "rspec"
When I search
Then I should see a link to "RSpec-1.1.3: Overview":http://rspec.info
Then I should see a link to "RSpec-1.1.3: Overview":http://rspec.info/
16 changes: 13 additions & 3 deletions examples/web/steps/stories_steps.rb
@@ -1,8 +1,18 @@
#require 'watir'
require 'spec'

case PLATFORM
when /darwin/
require 'safariwatir'
Watir::Browser = Watir::Safari
when /win32/
require 'watir'
Watir::Browser = Watir::IE
else
raise "Can't use Watir on #{PLATFORM}"
end

Before do
@b = 'Watir::IE.new'
@b = Watir::Browser.new
end

After do
Expand All @@ -22,5 +32,5 @@
end

Then /I should see a link to "(.*)":(.*)/ do |text, url|
@b.link(:url, /#{url}/).text.should == text
@b.link(:url, url).text.should == text
end

0 comments on commit b45ade5

Please sign in to comment.