File: rspec3.patch

package info (click to toggle)
ruby-orm-adapter 0.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216 kB
  • sloc: ruby: 699; makefile: 4
file content (39 lines) | stat: -rw-r--r-- 1,284 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: add basic RSpec3 support
Author: Cédric Boutillier <boutil@debian.org>
Bug: https://github.com/ianwhite/orm_adapter/pull/46
Bug-Debian: https://bugs.debian.org/795119
Last-Update: 2015-08-13

--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,5 +1,6 @@
 require 'rubygems'
 require 'rspec'
+require 'rspec/its'
 
 $:.unshift(File.dirname(__FILE__) + '/../lib')
 
--- a/spec/orm_adapter/base_spec.rb
+++ b/spec/orm_adapter/base_spec.rb
@@ -43,8 +43,8 @@
 
     describe "#valid_object?" do
       it "determines whether an object is valid for the current model class" do
-        subject.send(:valid_object?, Object.new).should be_true
-        subject.send(:valid_object?, String.new).should be_false
+        subject.send(:valid_object?, Object.new).should be true
+        subject.send(:valid_object?, String.new).should be false
       end
     end
 
--- a/spec/orm_adapter/example_app_shared.rb
+++ b/spec/orm_adapter/example_app_shared.rb
@@ -222,7 +222,7 @@
     describe "#destroy(instance)" do
       it "should destroy the instance if it exists" do
         user = create_model(user_class)
-        user_adapter.destroy(user).should be_true
+        user_adapter.destroy(user).should be true
         user_adapter.get(user.id).should be_nil
       end