Permalink
Browse files

Correctly update environment variables when set more than once

  • Loading branch information...
1 parent 5fba2db commit 08daac33dfaba80212772c7a94a85554537e42f6 @njonsson committed Feb 22, 2013
Showing with 3 additions and 1 deletion.
  1. +1 −1 lib/cape/hash_list.rb
  2. +2 −0 spec/cape/hash_list_spec.rb
View
@@ -51,7 +51,7 @@ def []=(key, value)
Array(pair).first == key
end
if index
- super key, value
+ super(index, [key, value])
else
self << [key, value]
end
@@ -13,6 +13,7 @@
describe 'when values are added out of order' do
before :each do
+ subject['foo'] = 'xxx'
subject['foo'] = 'bar'
subject['baz'] = 'qux'
end
@@ -35,6 +36,7 @@
it 'should index the values as expected' do
subject['foo'].should == 'bar'
subject['baz'].should == 'qux'
+ subject['not-found'].should be_nil
end
describe 'when sent #clear' do

0 comments on commit 08daac3

Please sign in to comment.