test/test_branch_factory.rb in mercurial-ruby-0.6.1 vs test/test_branch_factory.rb in mercurial-ruby-0.7.0
- old
+ new
@@ -10,9 +10,16 @@
branches = @repository.branches.all
branches.size.must_equal 5
branches.map(&:name).sort.must_equal %w(branch-from-remote another-branch new-branch old-branch default).sort
branches.map(&:status).sort.must_equal %w(active active closed active active).sort
end
+
+ it "should iterate through branches" do
+ names = []
+ @repository.branches.each{|b| names << b.name }
+ names.size.must_equal 5
+ names.must_equal %w(default another-branch branch-from-remote new-branch old-branch)
+ end
it "should find active branches" do
branches = @repository.branches.active
branches.size.must_equal 4
branches.map(&:name).sort.must_equal %w(another-branch new-branch default branch-from-remote).sort
\ No newline at end of file