spec/knapsack/config_spec.rb in knapsack-0.2.0 vs spec/knapsack/config_spec.rb in knapsack-0.3.0

- old
+ new

@@ -24,10 +24,15 @@ context 'when CIRCLE_NODE_TOTAL has value' do before { stub_const("ENV", { 'CIRCLE_NODE_TOTAL' => 4 }) } it { should eql 4 } end + + context 'when SEMAPHORE_THREAD_COUNT has value' do + before { stub_const("ENV", { 'SEMAPHORE_THREAD_COUNT' => 3 }) } + it { should eql 3 } + end end context "when ENV doesn't exist" do it { should eql 1 } end @@ -43,9 +48,14 @@ end context 'when CIRCLE_NODE_INDEX has value' do before { stub_const("ENV", { 'CIRCLE_NODE_INDEX' => 2 }) } it { should eql 2 } + end + + context 'when SEMAPHORE_CURRENT_THREAD has value' do + before { stub_const("ENV", { 'SEMAPHORE_CURRENT_THREAD' => 1 }) } + it { should eql 0 } end end context "when ENV doesn't exist" do it { should eql 0 }