Permalink
Browse files

add ie9 support with another environment variable

  • Loading branch information...
1 parent e1534ff commit 44eba025f3dfb1c046461d9d46785a29656e27f7 Hugh McGowan committed Feb 1, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 spec/implementation.rb
View
@@ -14,10 +14,11 @@
WatirSpec.persistent_browser = false
imp.browser_class = Watir::IE
browser = :ie
+ browser_version = (ENV['watir_browser_version'] || :ie8).to_sym
@jarmo

jarmo Feb 2, 2012

Owner

Any reason you didn't want to do it something like this instead:

browser_version = "ie#{imp.browser_class.version.to_i}".to_sym
@hmcgowan

hmcgowan Feb 2, 2012

Owner

that's much better - I fixed the code

end
imp.guard_proc = lambda { |args|
- args.any? { |arg| arg == :watir || arg == [:watir, browser] || arg == :ie }
+ args.any? {|arg| arg == :watir || arg == [:watir, browser] || arg == :ie || arg == browser_version}
}
end

0 comments on commit 44eba02

Please sign in to comment.