spec/lib/test_gitrepo.rb in treet-0.15.0 vs spec/lib/test_gitrepo.rb in treet-0.17.1

- old
+ new

@@ -76,10 +76,11 @@ johnb.tags.must_be_empty end it "should have no branches" do johnb.branches.must_be_empty + johnb.branches('bogus').must_be_nil end it "should return commit SHA for version label" do johnb.version.must_equal johnb.head.target end @@ -96,24 +97,22 @@ end end end describe "a gitrepo with an array of strings" do - def self.make_repo - @repo ||= begin + def repo + @@repo_with_array ||= begin data = { "label" => "Rainbow Colors", "colors" => %w{red orange yellow green blue purple} } thash = Treet::Hash.new(data) trepo = thash.to_repo(Dir.mktmpdir('repo', $topdir)) Treet::Gitrepo.new(trepo.root, :author => {:name => 'Bob', :email => 'bob@example.com'}) end end - let(:repo) { self.class.make_repo } - it "should fetch directly from file system" do repo.to_hash.wont_be_nil end it "should fetch via git" do @@ -397,9 +396,10 @@ r end it "should show a branch" do repo.branches.must_equal ['mybranch'] + repo.branches('mybranch').wont_be_nil end end describe "repo with non-gitified attributes" do let(:repo) do