spec/extensions/pretty_table_spec.rb in sequel-3.29.0 vs spec/extensions/pretty_table_spec.rb in sequel-3.30.0
- old
+ new
@@ -5,15 +5,10 @@
describe "Dataset#print" do
before do
@output = StringIO.new
@orig_stdout = $stdout
$stdout = @output
- @dataset = Sequel::Dataset.new(nil).from(:items)
- def @dataset.fetch_rows(sql)
- yield({:a=>1, :b=>2})
- yield({:a=>3, :b=>4})
- yield({:a=>5, :b=>6})
- end
+ @dataset = Sequel.mock(:fetch=>[{:a=>1, :b=>2}, {:a=>3, :b=>4}, {:a=>5, :b=>6}])[:items]
end
after do
$stdout = @orig_stdout
end