Exemplo n.º 1
0
 def it_can_dispatch_a_diff_command_to_the_app(self, args_,
                                               app_controller_):
     # fixture ----------------------
     diff_command = DiffCommand(None)
     # exercise ---------------------
     diff_command.execute(args_, app_controller_)
     # verify -----------------------
     app_controller_.diff_pkg.assert_called_once_with(
         args_.pkg_1_path, args_.pkg_2_path)
Exemplo n.º 2
0
 def it_should_trigger_parser_error_if_pkg_path_does_not_exist(
         self, pkg_1_path, pkg_2_path, err_frag, args_, parser_):
     # fixture ----------------------
     args_.pkg_1_path = pkg_1_path
     args_.pkg_2_path = pkg_2_path
     diff_command = DiffCommand(parser_)
     # exercise ---------------------
     diff_command.validate(args_)
     # verify -----------------------
     parser_.error.assert_called_once_with(ANY)
     assert err_frag in parser_.error.call_args[0][0]