File: 0030-test-support-rspec3.patch

package info (click to toggle)
ruby-dataobjects-sqlite3 0.10.16-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 312 kB
  • ctags: 124
  • sloc: ansic: 985; ruby: 323; makefile: 4
file content (24 lines) | stat: -rw-r--r-- 963 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Make tests support RSpec3
 Tests used deprecated functions. Patched them to support RSpec3
Author: Balasankar C <balasankarc@autistici.org>
Last-Update: 2015-07-21
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/spec/connection_spec.rb
+++ b/spec/connection_spec.rb
@@ -23,12 +23,12 @@
     describe 'connecting with busy timeout' do
 
       it 'connects with a valid timeout' do
-        DataObjects::Connection.new("#{CONFIG.uri}?busy_timeout=200").should_not be_nil
+        expect(DataObjects::Connection.new("#{CONFIG.uri}?busy_timeout=200")).to_not be_nil
       end
 
       it 'raises an error when passed an invalid value' do
-        lambda { DataObjects::Connection.new("#{CONFIG.uri}?busy_timeout=stuff") }.
-          should raise_error(ArgumentError)
+        expect(lambda { DataObjects::Connection.new("#{CONFIG.uri}?busy_timeout=stuff") }).
+          to raise_error(ArgumentError)
       end
 
     end