From 8420f6099cfefe35cdc56e31a39b14f142983cd5 Mon Sep 17 00:00:00 2001 From: Diego Araújo Date: Fri, 12 Jun 2015 17:10:44 -0300 Subject: [PATCH] Using a single instance of Repository.branch class throughout the tests. --- spec/javascripts/repository/branch_spec.js.coffee | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/spec/javascripts/repository/branch_spec.js.coffee b/spec/javascripts/repository/branch_spec.js.coffee index 1671ac3..3826139 100644 --- a/spec/javascripts/repository/branch_spec.js.coffee +++ b/spec/javascripts/repository/branch_spec.js.coffee @@ -1,7 +1,10 @@ #= require application -describe "Branch#constructor", -> - it "should construct a branch", -> - a = new Repository.Branch() - a.names.should.deep.equal({}) - assert.isNull(a.request) +describe "Repository.Branch", -> + beforeEach -> + @repository_branch = new Repository.Branch() + + describe "Branch#constructor", -> + it "should construct a branch", -> + @repository_branch.names.should.deep.equal({}) + assert.isNull(@repository_branch.request) -- libgit2 0.21.2