File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def unset ( var )
140
140
# gnuplot process.
141
141
142
142
def [] ( var )
143
- v = @settings . rassoc ( var )
143
+ v = @settings . reverse . rassoc ( var )
144
144
if v . nil? or v . first == :unset
145
145
nil
146
146
else
Original file line number Diff line number Diff line change 111
111
end
112
112
113
113
# TODO: check specification
114
- xit 'changes value in current settings' do
114
+ it 'changes value in current settings' do
115
115
expect { plot . unset 'title' }
116
116
. to change { plot [ 'title' ] }
117
- . from ( 'My title ' ) . to ( nil )
117
+ . from ( '" My Title" ' ) . to ( nil )
118
118
end
119
119
120
120
it 'unsets key on output' do
149
149
end
150
150
151
151
# TODO: check specification
152
- xit "returns the last value set" do
152
+ it "returns the last value set" do
153
153
expect ( plot [ 'title' ] ) . to eq ( '"My New Title"' )
154
154
end
155
155
end
161
161
end
162
162
163
163
# TODO: check specification
164
- xit { expect ( plot [ 'title' ] ) . to be_nil }
164
+ it { expect ( plot [ 'title' ] ) . to be_nil }
165
165
end
166
166
167
167
context 'when value was set, unset and set again' do
172
172
end
173
173
174
174
# TODO: check specification
175
- xit "returns the last value set" do
175
+ it "returns the last value set" do
176
176
expect ( plot [ 'title' ] ) . to eq ( '"My New Title"' )
177
177
end
178
178
end
You can’t perform that action at this time.
0 commit comments