File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ shared_examples 'quotes value when setting in a plot for' do |field |
2
+ describe "##{ field } " do
3
+ before do
4
+ plot . public_send ( field , 'text' )
5
+ end
6
+
7
+ it 'quotes value when setting it' do
8
+ expect ( plot . to_gplot ) . to eq ( "set #{ field } \" text\" \n " )
9
+ end
10
+ end
11
+ end
12
+
1
13
describe Gnuplot ::Plot do
2
14
subject ( :plot ) { described_class . new }
3
15
64
76
end
65
77
end
66
78
end
79
+
80
+ it_behaves_like 'quotes value when setting in a plot for' , :title
81
+ it_behaves_like 'quotes value when setting in a plot for' , :output
82
+ it_behaves_like 'quotes value when setting in a plot for' , :xlabel
83
+ it_behaves_like 'quotes value when setting in a plot for' , :x2label
84
+ it_behaves_like 'quotes value when setting in a plot for' , :ylabel
85
+ it_behaves_like 'quotes value when setting in a plot for' , :y2label
86
+ it_behaves_like 'quotes value when setting in a plot for' , :clabel
87
+ it_behaves_like 'quotes value when setting in a plot for' , :cblabel
88
+ it_behaves_like 'quotes value when setting in a plot for' , :zlabel
67
89
end
You can’t perform that action at this time.
0 commit comments