Skip to content
This repository has been archived by the owner on May 1, 2018. It is now read-only.

Commit

Permalink
More or less redid all the funk tests in light of the reworked test h…
Browse files Browse the repository at this point in the history
…elper
  • Loading branch information
webmat committed Aug 5, 2008
1 parent 278446f commit 4dde605
Showing 1 changed file with 42 additions and 8 deletions.
50 changes: 42 additions & 8 deletions test/functional/grb_test.rb
Expand Up @@ -3,18 +3,52 @@
class GRBTest < Test::Unit::TestCase
include ShouldaFunctionalHelpers

on_a_new_repo do
in_directory_for :local1 do
context "creating a branch" do
on_a_repository do
context "creating a branch in a local clone" do
setup do
in_directory_for :local1
#assert_match(/local1\Z/, execute('pwd').chomp) #Sanity check

run_with 'create new_branch'
end

should_have_branch 'new_branch', :local
should_have_branch 'new_branch', :remote

context "the remote repository" do
setup do
run_with "create new_branch"
in_directory_for :remote
end

should_create_branch 'new_branch', :local
should_create_branch 'new_branch', :remote
should_have_branch 'new_branch', :local
end

context "the other local clone, tracking the new branch" do
setup do
in_directory_for :local2
assert_match(/local2\Z/, execute('pwd').chomp) #Sanity check

run_with 'track new_branch'
end

in_directory_for :remote do
should_create_branch 'new_branch', :local
should_have_branch 'new_branch', :local
should_have_branch 'new_branch', :remote
end

context "then deleting the branch" do
setup do
run_with 'delete new_branch'
end

should_not_have_branch 'new_branch', :local
should_not_have_branch 'new_branch', :remote

context "the remote repository" do
setup do
in_directory_for :remote
end

should_not_have_branch 'new_branch', :local
end
end
end
Expand Down

0 comments on commit 4dde605

Please sign in to comment.