Skip to content

Commit 2a802c3

Browse files
committed
Add method missing spec
1 parent 1134bb5 commit 2a802c3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

spec/lib/ruby_gnuplot/plot_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,22 @@
177177
end
178178
end
179179
end
180+
181+
describe 'method missing' do
182+
it 'delegates to set call' do
183+
expect { plot.fake_field('value') }
184+
.to change(plot, :settings)
185+
.from([])
186+
.to([[:set, 'fake_field', 'value']])
187+
end
188+
189+
context 'when field should be quoted' do
190+
it 'delegates to set call and quote it' do
191+
expect { plot.output('value') }
192+
.to change(plot, :settings)
193+
.from([])
194+
.to([[:set, 'output', '"value"']])
195+
end
196+
end
197+
end
180198
end

0 commit comments

Comments
 (0)