@@ -31,46 +31,38 @@ def setUp(self, OSUtilMock):
3131 def test_run_executes_bundler_on_nixes (self ):
3232 self .osutils .is_windows .side_effect = [False ]
3333 self .under_test = SubprocessBundler (self .osutils )
34- self .under_test .run (["install" , "--without" , "development" , "test" ])
35- self .osutils .popen .assert_called_with (
36- ["bundle" , "install" , "--without" , "development" , "test" ], cwd = None , stderr = "PIPE" , stdout = "PIPE"
37- )
34+ self .under_test .run (["install" ])
35+ self .osutils .popen .assert_called_with (["bundle" , "install" ], cwd = None , stderr = "PIPE" , stdout = "PIPE" )
3836
3937 def test_run_executes_bundler_on_windows (self ):
4038 self .osutils .is_windows .side_effect = [True ]
4139 self .under_test = SubprocessBundler (self .osutils )
42- self .under_test .run (["install" , "--without" , "development" , "test" ])
43- self .osutils .popen .assert_called_with (
44- ["bundler.bat" , "install" , "--without" , "development" , "test" ], cwd = None , stderr = "PIPE" , stdout = "PIPE"
45- )
40+ self .under_test .run (["install" ])
41+ self .osutils .popen .assert_called_with (["bundler.bat" , "install" ], cwd = None , stderr = "PIPE" , stdout = "PIPE" )
4642
4743 def test_uses_custom_bundler_path_if_supplied (self ):
48- self .under_test .run (["install" , "--without" , "development" , "test" ])
49- self .osutils .popen .assert_called_with (
50- ["/a/b/c/bundle" , "install" , "--without" , "development" , "test" ], cwd = None , stderr = "PIPE" , stdout = "PIPE"
51- )
44+ self .under_test .run (["install" ])
45+ self .osutils .popen .assert_called_with (["/a/b/c/bundle" , "install" ], cwd = None , stderr = "PIPE" , stdout = "PIPE" )
5246
5347 def test_uses_cwd_if_supplied (self ):
54- self .under_test .run (["install" , "--without" , "development" , "test" ], cwd = "/a/cwd" )
55- self .osutils .popen .assert_called_with (
56- ["/a/b/c/bundle" , "install" , "--without" , "development" , "test" ], cwd = "/a/cwd" , stderr = "PIPE" , stdout = "PIPE"
57- )
48+ self .under_test .run (["install" ], cwd = "/a/cwd" )
49+ self .osutils .popen .assert_called_with (["/a/b/c/bundle" , "install" ], cwd = "/a/cwd" , stderr = "PIPE" , stdout = "PIPE" )
5850
5951 def test_returns_popen_out_decoded_if_retcode_is_0 (self ):
6052 self .popen .out = b"some encoded text\n \n "
61- result = self .under_test .run (["install" , "--without" , "development" , "test" ])
53+ result = self .under_test .run (["install" ])
6254 self .assertEqual (result , "some encoded text" )
6355
6456 def test_logs_warning_when_gemfile_missing (self ):
6557 self .popen .returncode = 10
6658 with patch .object (logger , "warning" ) as mock_warning :
67- self .under_test .run (["install" , "--without" , "development" , "test" ])
59+ self .under_test .run (["install" ])
6860 mock_warning .assert_called_once_with ("Gemfile not found. Continuing the build without dependencies." )
6961
7062 def test_bundle_file_removed_if_generated (self ):
7163 self .popen .returncode = 10
7264 self .osutils .directory_exists .return_value = True
73- self .under_test .run (["install" , "--without" , "development" , "test" ])
65+ self .under_test .run (["install" ])
7466 self .osutils .get_bundle_dir .assert_called_once ()
7567 self .osutils .remove_directory .assert_called_once ()
7668
@@ -79,30 +71,30 @@ def test_raises_BundlerExecutionError_with_stdout_text_if_retcode_is_not_0(self)
7971 self .popen .out = b"some error text\n \n "
8072 self .popen .err = b""
8173 with self .assertRaises (BundlerExecutionError ) as raised :
82- self .under_test .run (["install" , "--without" , "development" , "test" ])
74+ self .under_test .run (["install" ])
8375 self .assertEqual (raised .exception .args [0 ], "Bundler Failed: some error text" )
8476
8577 def test_raises_BundlerExecutionError_with_stderr_text_if_retcode_is_not_0 (self ):
8678 self .popen .returncode = 1
8779 self .popen .err = b"some error text\n \n "
8880 self .popen .out = b""
8981 with self .assertRaises (BundlerExecutionError ) as raised :
90- self .under_test .run (["install" , "--without" , "development" , "test" ])
82+ self .under_test .run (["install" ])
9183 self .assertEqual (raised .exception .args [0 ], "Bundler Failed: some error text" )
9284
9385 def test_raises_BundlerExecutionError_with_both_stderr_and_stdout_text_if_retcode_is_not_0 (self ):
9486 self .popen .returncode = 1
9587 self .popen .err = b"some error text from stderr\n \n "
9688 self .popen .out = b"some error text from stdout\n \n "
9789 with self .assertRaises (BundlerExecutionError ) as raised :
98- self .under_test .run (["install" , "--without" , "development" , "test" ])
90+ self .under_test .run (["install" ])
9991 self .assertEqual (
10092 raised .exception .args [0 ], f"Bundler Failed: some error text from stdout{ linesep } some error text from stderr"
10193 )
10294
10395 def test_raises_ValueError_if_args_not_a_list (self ):
10496 with self .assertRaises (ValueError ) as raised :
105- self .under_test .run (( "install" , "--without" , "development" , "test" ) )
97+ self .under_test .run ("install" )
10698 self .assertEqual (raised .exception .args [0 ], "args must be a list" )
10799
108100 def test_raises_ValueError_if_args_empty (self ):
0 commit comments