File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 87
87
it_behaves_like 'quotes value when setting in a plot for' , :cblabel
88
88
it_behaves_like 'quotes value when setting in a plot for' , :zlabel
89
89
90
- describe '[]' do
90
+ describe '#unset' do
91
+ let ( :expected_string ) do
92
+ [
93
+ 'set title "My Title"' ,
94
+ 'unset title' ,
95
+ ''
96
+ ] . join ( "\n " )
97
+ end
98
+
99
+ before do
100
+ plot . title 'My Title'
101
+ end
102
+
103
+ # TODO: check specification
104
+ xit 'changes value in current settings' do
105
+ expect { plot . unset 'title' }
106
+ . to change { plot [ 'title' ] }
107
+ . from ( 'My title' ) . to ( nil )
108
+ end
109
+
110
+ it 'unsets key on output' do
111
+ plot . unset 'title'
112
+ expect ( plot . to_gplot ) . to eq ( expected_string )
113
+ end
114
+ end
115
+
116
+ describe '#[]' do
91
117
context 'when value was never set' do
92
118
it { expect ( plot [ 'key' ] ) . to be_nil }
93
119
end
You can’t perform that action at this time.
0 commit comments