1
0
Эх сурвалжийг харах

Rename binary role and associated test

Daniel Gempesaw 10 жил өмнө
parent
commit
863c2a492c

+ 1 - 1
lib/Selenium/BinaryModeBuilder.pm → lib/Selenium/CanStartBinary.pm

@@ -1,4 +1,4 @@
-package Selenium::BinaryModeBuilder;
+package Selenium::CanStartBinary;
 
 # ABSTRACT: Teach a WebDriver how to start its own binary aka no JRE!
 use File::Which qw/which/;

+ 1 - 1
lib/Selenium/Chrome.pm

@@ -2,7 +2,7 @@ package Selenium::Chrome;
 
 # ABSTRACT: A convenience package for creating a Chrome instance
 use Moo;
-with 'Selenium::BinaryModeBuilder';
+with 'Selenium::CanStartBinary';
 extends 'Selenium::Remote::Driver';
 
 =head1 SYNOPSIS

+ 1 - 1
lib/Selenium/Firefox.pm

@@ -2,7 +2,7 @@ package Selenium::Firefox;
 
 # ABSTRACT: A convenience package for creating a Firefox instance
 use Moo;
-with 'Selenium::BinaryModeBuilder';
+with 'Selenium::CanStartBinary';
 extends 'Selenium::Remote::Driver';
 
 =head1 SYNOPSIS

+ 1 - 1
lib/Selenium/PhantomJS.pm

@@ -2,7 +2,7 @@ package Selenium::PhantomJS;
 
 # ABSTRACT: A convenience package for creating a PhantomJS instance
 use Moo;
-with 'Selenium::BinaryModeBuilder';
+with 'Selenium::CanStartBinary';
 extends 'Selenium::Remote::Driver';
 
 =head1 SYNOPSIS

+ 4 - 4
t/binary.t → t/CanStartBinary.t

@@ -23,7 +23,7 @@ PHANTOMJS: {
     is( $phantom->browser_name, 'phantomjs', 'binary phantomjs is okay');
     isnt( $phantom->port, 4444, 'phantomjs can start up its own binary');
 
-    ok( Selenium::BinaryModeBuilder::probe_port( $phantom->port ), 'the phantomjs binary is listening on its port');
+    ok( Selenium::CanStartBinary::probe_port( $phantom->port ), 'the phantomjs binary is listening on its port');
 }
 
 CHROME: {
@@ -35,19 +35,19 @@ CHROME: {
     ok( $chrome->browser_name eq 'chrome', 'convenience chrome is okay' );
     isnt( $chrome->port, 4444, 'chrome can start up its own binary');
 
-    ok( Selenium::BinaryModeBuilder::probe_port( $chrome->port ), 'the chrome binary is listening on its port');
+    ok( Selenium::CanStartBinary::probe_port( $chrome->port ), 'the chrome binary is listening on its port');
 }
 
 FIREFOX: {
     my $binary = Selenium::Firefox::Binary::firefox_path();
     ok(-x $binary, 'we can find some sort of firefox');
 
-    my $command = Selenium::BinaryModeBuilder::_construct_command('firefox', 1234);
+    my $command = Selenium::CanStartBinary::_construct_command('firefox', 1234);
     ok($command =~ /firefox -no-remote/, 'firefox command has proper args');
 
     my $firefox = Selenium::Firefox->new;
     isnt( $firefox->port, 4444, 'firefox can start up its own binary');
-    ok( Selenium::BinaryModeBuilder::probe_port( $firefox->port ), 'the firefox binary is listening on its port');
+    ok( Selenium::CanStartBinary::probe_port( $firefox->port ), 'the firefox binary is listening on its port');
 }
 
 sub is_proper_phantomjs_available {