Permalink
Browse files

Add spec helper that loads Watir

  • Loading branch information...
1 parent 7d38067 commit f6ab0857d12b269e20bfd6731454c796008031ed @jarib jarib committed with bret Sep 7, 2009
Showing with 15 additions and 0 deletions.
  1. +15 −0 spec/spec_helper.rb
View
@@ -0,0 +1,15 @@
+$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../commonwatir/lib")
+$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../watir/lib")
+$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../firewatir/lib")
+
+require "watir"
+
+case ENV['watir_browser']
+when /firefox/
+ Browser = FireWatir::Firefox
+else
+ Browser = Watir::IE
+ WatirSpec.persistent_browser = true
+end
+
+include Watir::Exception

0 comments on commit f6ab085

Please sign in to comment.