From a0d281cb9bea9b7ed6db3bc15b86bea63980bac7 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Thu, 28 Sep 2023 10:03:18 -0700 Subject: [PATCH] Fix paged_operations oracle/db2 specs --- spec/extensions/paged_operations_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/extensions/paged_operations_spec.rb b/spec/extensions/paged_operations_spec.rb index 90daaed98..c57c45f7b 100644 --- a/spec/extensions/paged_operations_spec.rb +++ b/spec/extensions/paged_operations_spec.rb @@ -182,19 +182,19 @@ end it "should raise error for DB2 with emulated offsets" do - @c.dataset = Sequel.mock('db2')[:t] + @c.dataset = Sequel.connect('mock://db2')[:t] ds = @c.dataset - proc{ds.offset(1).paged_delete}.must_raise Sequel::Error - proc{ds.offset(1).paged_update(:x=>1)}.must_raise Sequel::Error - proc{ds.offset(1).paged_datasets{}}.must_raise Sequel::Error + proc{ds.paged_delete}.must_raise Sequel::Error + proc{ds.paged_update(:x=>1)}.must_raise Sequel::Error + proc{ds.paged_datasets{}}.must_raise Sequel::Error end it "should raise error paged_delete for Oracle with emulated offsets" do - db = Sequel.mock('oracle') - def db.server_version; 11020002; end + db = Sequel.connect('mock://oracle') + def db.server_version(_=nil); 11020002; end @c.dataset = db[:t] ds = @c.dataset - proc{ds.offset(1).paged_delete}.must_raise Sequel::Error + proc{ds.paged_delete}.must_raise Sequel::Error end it "should raise error for dataset with offset" do