def it_creates_a_new_branch_at_commit_ref(self, new_test_repo): assert not branch_exists("foobar") create_branch_at("foobar", "2294d979") assert branch_exists("foobar") assert branch_hash("foobar").startswith("2294d979") assert current_branch_name() != "foobar"
def then_the_current_branch_is_branch_name(context, branch_name): branch = current_branch_name() assert branch == branch_name, "got '%s'" % branch
def given_the_current_branch_is_branch_name(context, branch_name): if current_branch_name() != branch_name: checkout(branch_name)
def it_checks_out_a_branch(self, new_test_repo): bazfoo = new_test_repo.join("bazfoo.txt") assert not bazfoo.check() checkout("master") assert bazfoo.check() assert current_branch_name() == "master"
def it_is_spike_for_test_repo(self, readonly_test_repo): assert current_branch_name() == "spike"