Example #1
0
    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"
Example #2
0
def then_the_current_branch_is_branch_name(context, branch_name):
    branch = current_branch_name()
    assert branch == branch_name, "got '%s'" % branch
Example #3
0
def given_the_current_branch_is_branch_name(context, branch_name):
    if current_branch_name() != branch_name:
        checkout(branch_name)
Example #4
0
 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"
Example #5
0
 def it_is_spike_for_test_repo(self, readonly_test_repo):
     assert current_branch_name() == "spike"