소스 검색

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;
 }