浏览代码

Simplify binary test resolution of binaries

Daniel Gempesaw 10 年之前
父节点
当前提交
e674d12b35
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      t/CanStartBinary.t

+ 3 - 3
t/CanStartBinary.t

@@ -15,7 +15,7 @@ unless ( $ENV{RELEASE_TESTING} ) {
 
 PHANTOMJS: {
   SKIP: {
-        my $has_phantomjs = Selenium::CanStartBinary::_find_executable('phantomjs');
+        my $has_phantomjs = which('phantomjs');
         skip 'Phantomjs binary not found in path', 3
           unless $has_phantomjs;
 
@@ -35,7 +35,7 @@ PHANTOMJS: {
 
 CHROME: {
   SKIP: {
-        my $has_chromedriver = Selenium::CanStartBinary::_find_executable('chromedriver');
+        my $has_chromedriver = which('chromedriver');
         skip 'Chrome binary not found in path', 3
           unless $has_chromedriver;
 
@@ -67,7 +67,7 @@ FIREFOX: {
 sub is_proper_phantomjs_available {
     my ($ver) = @_;
 
-    $ver =~ s/\.\d$//;
+    $ver =~ s/^(\d\.\d).*/$1/;
     return $ver >= 1.9;
 }