示例#1
0
 def test_running_init_creates_files(self):
     """Running init results in correct config files."""
     Given.I_have_the_following_input('init')
     When.I_parse_a_line_of_the_input()
     And.I_setup_and_read_files()
     And.I_execute_the_command()
     Then.I_have_Mr_Repo_config_files()
示例#2
0
 def test_running_init_clean(self):
     """Running init with the '--clean' flag results in a clean repo."""
     Given.I_have_the_following_input('init --clean')
     When.I_parse_a_line_of_the_input()
     And.I_setup_and_read_files()
     And.I_execute_the_command()
     Then.I_have_a_clean_Mr_Repo_repository()
示例#3
0
 def test_adding_a_git_repo(self):
     """Adding a valid directory/repo works."""
     repo_name = "Shoes"
     Given.I_have_a_git_repository_called(repo_name)
     And.I_create_a_Mr_Repo_repository(clean=True)
     When.I_add_the_repository(world.repos[0].working_dir)
     Then.I_have_updated_config_files(
         config_check=RepossesserStories.__config_has_new_repo(repo_name),
         repo_check=RepossesserStories.__repo_has_new_repo(repo_name))
示例#4
0
    def test_update_searches_down_directories(self):
        repo_name = "Socks"
        current_dir = Given.I_have_a_nested_structure(levels=4)
        repo_path = os.path.join(current_dir, repo_name)

        And.I_have_a_git_repository_called(repo_path)
        When.I_create_a_Mr_Repo_repository(clean=True)
        And.I_execute_the_following_input("update")
        Then.I_have_updated_config_files(
            config_check=RepossesserStories.__config_has_new_repo(repo_name),
            repo_check=RepossesserStories.__repo_has_new_repo(repo_name))