spectre-core 1.12.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ module Spectre
24
24
  end
25
25
 
26
26
  def should_not_be_empty
27
- raise AssertionFailure.new('The value should not be empty', 'nothing', self) unless self != nil
27
+ raise AssertionFailure.new('The value is empty', 'nothing', self) unless self != nil
28
28
  end
29
29
 
30
30
  def or other
@@ -52,7 +52,7 @@ module Spectre
52
52
  end
53
53
 
54
54
  def should_not_be_empty
55
- raise AssertionFailure.new('not empty', 'nil')
55
+ raise AssertionFailure.new('The list is empty', 'nil')
56
56
  end
57
57
  end
58
58
 
@@ -66,21 +66,21 @@ module Spectre
66
66
  end
67
67
 
68
68
  def should_be_empty
69
- raise AssertionFailure.new("The object should be empty", nil, self) unless self.empty?
69
+ raise AssertionFailure.new('The object should be empty', nil, self) unless self.empty?
70
70
  end
71
71
 
72
72
  def should_not_be_empty
73
- raise AssertionFailure.new("The object should not be empty", nil, self) if self.empty?
73
+ raise AssertionFailure.new('The object should not be empty', nil, self) if self.empty?
74
74
  end
75
75
  end
76
76
 
77
77
  class ::OpenStruct
78
78
  def should_be_empty
79
- raise AssertionFailure.new("The object should be empty", nil, self) unless self.to_h.empty?
79
+ raise AssertionFailure.new('The object should be empty', nil, self) unless self.to_h.empty?
80
80
  end
81
81
 
82
82
  def should_not_be_empty
83
- raise AssertionFailure.new("The object should not be empty", nil, self) if self.to_h.empty?
83
+ raise AssertionFailure.new('The object should not be empty', nil, self) if self.to_h.empty?
84
84
  end
85
85
  end
86
86
 
@@ -108,11 +108,11 @@ module Spectre
108
108
  end
109
109
 
110
110
  def should_be_empty
111
- raise AssertionFailure.new('empty list', self) unless self.empty?
111
+ raise AssertionFailure.new('The list is not empty', self) unless self.empty?
112
112
  end
113
113
 
114
114
  def should_not_be_empty
115
- raise AssertionFailure.new('no empty list', self) if self.empty?
115
+ raise AssertionFailure.new('The list is empty', self) if self.empty?
116
116
  end
117
117
  end
118
118
 
@@ -134,7 +134,7 @@ module Spectre
134
134
  end
135
135
 
136
136
  def should_contain(value)
137
- raise AssertionFailure.new("`value' must not be nil") if value.nil?
137
+ raise AssertionFailure.new("The value is nil") if value.nil?
138
138
 
139
139
  predicate = proc { |x| self.include? x.to_s }
140
140
  evaluation = SingleEvaluation.new(value)
@@ -252,7 +252,7 @@ module Spectre
252
252
  end
253
253
 
254
254
  def observe desc = nil
255
- prefix = "observing"
255
+ prefix = 'observing'
256
256
  prefix += " '#{desc}'" if desc
257
257
 
258
258
  begin
data/lib/spectre/bag.rb CHANGED
@@ -1,21 +1,21 @@
1
- require_relative '../spectre'
2
-
3
- require 'ostruct'
4
-
5
- module Spectre
6
- module Bag
7
- class << self
8
- @@bag
9
-
10
- def bag
11
- @@bag
12
- end
13
- end
14
-
15
- Spectre.register do |config|
16
- @@bag = OpenStruct.new
17
- end
18
-
19
- Spectre.delegate :bag, to: self
20
- end
21
- end
1
+ require_relative '../spectre'
2
+
3
+ require 'ostruct'
4
+
5
+ module Spectre
6
+ module Bag
7
+ class << self
8
+ @@bag
9
+
10
+ def bag
11
+ @@bag
12
+ end
13
+ end
14
+
15
+ Spectre.register do |config|
16
+ @@bag = OpenStruct.new
17
+ end
18
+
19
+ Spectre.delegate :bag, to: self
20
+ end
21
+ end