Skip to content

Commit 58abe53

Browse files
committed
fix Dataset specs (check output)
1 parent 9b0ac00 commit 58abe53

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/dataset_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
end
132132
end
133133

134-
context 'updating' do
134+
context 'safe update' do
135135
before do
136136
x = (0..10).to_a
137137
y = x.map { |xx| Math.exp(-xx) }
@@ -186,20 +186,20 @@
186186
end
187187

188188
it 'should update an option of existing object' do
189-
@ds.lw!(3)
189+
expect(@ds.lw!(3)).to equal(@ds)
190190
expect(@ds.lw).to eql(3)
191191
@ds.pt = 8
192192
expect(@ds.pt).to eql(8)
193193
end
194194

195195
it 'should update several options of existing object at once via #options!' do
196-
@ds.options!(lw: 3, pt: 8)
196+
expect(@ds.options!(lw: 3, pt: 8)).to equal(@ds)
197197
expect(@ds.lw).to eql(3)
198198
expect(@ds.pt).to eql(8)
199199
end
200200

201201
it 'should update several options of existing object at once via #update!' do
202-
@ds.update!(lw: 3, pt: 8)
202+
expect(@ds.update!(lw: 3, pt: 8)).to equal(@ds)
203203
expect(@ds.lw).to eql(3)
204204
expect(@ds.pt).to eql(8)
205205
end
@@ -211,7 +211,7 @@
211211
x1 = (11..15).to_a
212212
y1 = x1.map { |xx| Math.exp(-xx) }
213213
@ds.plot(options0)
214-
@ds.update!([x1, y1])
214+
expect(@ds.update!([x1, y1])).to equal(@ds)
215215
@ds.plot(options1)
216216
expect(same_images?(*paths)).to be_falsey
217217
end
@@ -220,7 +220,7 @@
220220
x1 = (11..15).to_a
221221
y1 = x1.map { |xx| Math.exp(-xx) }
222222
size_before = File.size(@ds_file.data.to_s[1..-2])
223-
@ds_file.update!([x1, y1])
223+
expect(@ds_file.update!([x1, y1])).to equal(@ds_file)
224224
size_after = File.size(@ds_file.data.to_s[1..-2])
225225
expect(size_after).to be > size_before
226226
end

0 commit comments

Comments
 (0)