spectus 2.1.3 → 2.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a312e78b039e7c9918d904c9181ccc7a1f27c3cc
4
- data.tar.gz: 64ad093824b550c74ada53baa5103e66f5bdf9b9
3
+ metadata.gz: e08a0c9d455c7e57dc73d412e7f1a1c6a470b954
4
+ data.tar.gz: 19554aba37f38c6227b199498bb5b99df33a9896
5
5
  SHA512:
6
- metadata.gz: 833b4df309519b4902d4c37c76dd583ac6f4e8335e243508740dc401a59ab68ed47845c68016f7cc2cb8d23eefda087d78275ebe92a59450e3acb8f07b38f52c
7
- data.tar.gz: e57d7f00a15dabe3b4474fc9f748ae48effa27be357d3605b5ba62747c53e233b114e6d9a9d63dae229c2c7c22937b94c565c3fa1947f4bbe95279b123187097
6
+ metadata.gz: 3c514e5429e220d6f8dd0954d7a6779951efb876d6cf0565ee4042f77618f2ef5127b6f2232de254f1133099393c53e4879611f41903d7ba6059ff601474dfcb
7
+ data.tar.gz: 013b5b2aeb1507c74ba3fb4ec942cb56fde0a3ede1c3acc4d16027292991fc99dedf92ba7290f701737488e6728f15a795936415ea1677661edef32343a5fbe5
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- ��OYo kG�_|ϟZ��g�IA�z�i��AD�t�+h-�msk��,�0=%��i(ʊ�>J'��%x�+`��D4{'xc;m��0�r׮��Ҥ�]���e8��@�RW�L),�� [�&�d}?rv l�:%a^�af��0*)iH
1
+ qrS��J{��4��)�����:��|�v��\���q����w�^XaìS��%�!�\��8hp(�r�G��u����w2BSu��/�?�Ҝ���Z9�$|��U'�+�஛�D�����Ǫa#P��g��,h���N�Ҹ��U�ڒ�݀O� N8H%mG�*�p��lR@fY� /
data/README.md CHANGED
@@ -58,7 +58,7 @@ Given the `"ルビー"` object, when it receives `valid_encoding?` method, then
58
58
 
59
59
  ```ruby
60
60
  Spectus.this { 'ルビー'.valid_encoding? }.MUST :BeTrue
61
- # => #<Spectus::Result::Pass:0x007fa41c371b90 @message="passing spec", @subject=#<Proc:0x007fa41c3721f8@(irb):1>, @challenge=:call, @context=[], @actual=true, @expected=:BeTrue, @got=true, @error=nil, @level=:High, @negate=false, @valid=true>
61
+ # => #<Spectus::Result::Pass:0x007fbbc12b9fd8 @subject=#<Proc:0x007fbbc12ba410@(irb):1>, @challenge=:call, @context=[], @actual=true, @expected=:BeTrue, @got=true, @error=nil, @level=:High, @negate=false, @valid=true>
62
62
  ```
63
63
 
64
64
  The result of the test shows that the spec passed.
@@ -69,7 +69,7 @@ Given the `"foo"` object, when it receives `length` method, then it **MUST NOT**
69
69
 
70
70
  ```ruby
71
71
  Spectus.this { 'foo'.length }.MUST_NOT RaiseException: NoMethodError
72
- # => #<Spectus::Result::Pass:0x007fa41e001d50 @message="passing spec", @subject=#<Proc:0x007fa41c34a928@(irb):2>, @challenge=:call, @context=[], @actual=3, @expected={:RaiseException=>NoMethodError}, @got=true, @error=nil, @level=:High, @negate=true, @valid=true>
72
+ # => #<Spectus::Result::Pass:0x007fbbc12a8e90 @subject=#<Proc:0x007fbbc12a95e8@(irb):2>, @challenge=:call, @context=[], @actual=3, @expected={:RaiseException=>NoMethodError}, @got=true, @error=nil, @level=:High, @negate=true, @valid=true>
73
73
  ```
74
74
 
75
75
  The result of the test shows that the spec passed.
@@ -80,7 +80,7 @@ Given the `BasicObject` object, when it receives `superclass` method, then it **
80
80
 
81
81
  ```ruby
82
82
  Spectus.this { BasicObject.superclass }.SHOULD Equal: NilClass
83
- # => #<Spectus::Result::Pass:0x007fa41c2f1d00 @message="passing spec", @subject=#<Proc:0x007fa41c2f2110@(irb):3>, @challenge=:call, @context=[], @actual=nil, @expected={:Equal=>NilClass}, @got=false, @error=nil, @level=:Medium, @negate=false, @valid=false>
83
+ # => #<Spectus::Result::Pass:0x007fbbc1291ec0 @subject=#<Proc:0x007fbbc12923e8@(irb):3>, @challenge=:call, @context=[], @actual=nil, @expected={:Equal=>NilClass}, @got=false, @error=nil, @level=:Medium, @negate=false, @valid=false>
84
84
  ```
85
85
 
86
86
  Instead of the expected `NilClass` class, its sole instance (which is `nil`) was returned.
@@ -103,7 +103,7 @@ Given the `"foo"` object, when it receives `blank?` method, then it **MAY** be `
103
103
 
104
104
  ```ruby
105
105
  Spectus.this { 'foo'.blank? }.MAY :BeFalse
106
- # => #<Spectus::Result::Pass:0x007fa41c2bae18 @message="passing spec", @subject=#<Proc:0x007fa41c2bb368@(irb):6>, @challenge=:call, @context=[], @actual=nil, @expected=:BeFalse, @got=nil, @error=#<NoMethodError: undefined method `blank?' for "foo":String>, @level=:Low, @negate=false, @valid=false>
106
+ # => #<Spectus::Result::Pass:0x007fbbc1b7c238 @subject=#<Proc:0x007fbbc1b7c698@(irb):5>, @challenge=:call, @context=[], @actual=nil, @expected=:BeFalse, @got=nil, @error=#<NoMethodError: undefined method `blank?' for "foo":String>, @level=:Low, @negate=false, @valid=false>
107
107
  ```
108
108
 
109
109
  The optional `blank?` method is not implemented (unlike in [Ruby on Rails](http://api.rubyonrails.org/classes/Object.html#method-i-blank-3F), for instance), so the result of the test shows that the spec passed.
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 2.1.3
1
+ 2.2.0
@@ -0,0 +1 @@
1
+ 2837aff76c22e3d8627b0c4139ba633c0032ba4b993f9cac9b0bc33897acd334d5ba9f78a5f71525dd287a4ab9eff545eff42a92e73c368630edd3690b15f47c
@@ -0,0 +1 @@
1
+ 2c4f497d16f5d0a4898abe0fb7ab620e76fe4e21d14f3ecfca03b1c43d388cb92e6a9a3b8c228bc922147440272dfbcfd2c2dbfc1e1466638246511143e3c6f1
@@ -29,14 +29,14 @@ module Spectus
29
29
  #
30
30
  # @return [Result::Pass] pass the spec.
31
31
  def pass!(state)
32
- Result::Pass.new('passing spec', *result_signature(state))
32
+ Result::Pass.new(*result_signature(state))
33
33
  end
34
34
 
35
35
  # @param state [Sandbox] The sandbox that tested the code.
36
36
  #
37
37
  # @raise [Result::Fail] fail the spec.
38
38
  def fail!(state)
39
- fail(Result::Fail.new('failing spec', *result_signature(state)))
39
+ fail Result::Fail.new(*result_signature(state)), 'failing spec'
40
40
  end
41
41
 
42
42
  # @param state [Sandbox] The sandbox that tested the code.
@@ -7,7 +7,6 @@ module Spectus
7
7
  module Base
8
8
  # Initialize the result class.
9
9
  #
10
- # @param message [String] It is describing the actual/error value.
11
10
  # @param subject [#object_id] The untrusted object to be tested.
12
11
  # @param challenge [Symbol] The method to call on the subject.
13
12
  # @param context [Array] Parameters of the challenge.
@@ -21,14 +20,8 @@ module Spectus
21
20
  # @param level [:High, :Medium, :Low] The level of the expectation.
22
21
  # @param negate [Boolean] Evaluate to a negative assertion.
23
22
  # @param valid [Boolean] Report if the test was true or false.
24
- def initialize(message, subject, challenge, context, actual, expected,
25
- got, error, level, negate, valid)
26
-
27
- if respond_to?(:exception)
28
- super(message)
29
- else
30
- @message = message
31
- end
23
+ def initialize(subject, challenge, context, actual, expected, got, error,
24
+ level, negate, valid)
32
25
 
33
26
  @subject = subject
34
27
  @challenge = challenge
@@ -6,8 +6,6 @@ module Spectus
6
6
  class Pass
7
7
  include Base
8
8
 
9
- attr_reader :message
10
-
11
9
  # The value of the expectation of the spec.
12
10
  #
13
11
  # @return [Boolean] the spec was true.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
@@ -30,7 +30,7 @@ cert_chain:
30
30
  dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
31
31
  0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
32
32
  -----END CERTIFICATE-----
33
- date: 2015-07-31 00:00:00.000000000 Z
33
+ date: 2015-08-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: matchi
@@ -144,6 +144,8 @@ files:
144
144
  - checksum/spectus-2.1.0.gem.sha512
145
145
  - checksum/spectus-2.1.1.gem.sha512
146
146
  - checksum/spectus-2.1.2.gem.sha512
147
+ - checksum/spectus-2.1.3.gem.sha512
148
+ - checksum/spectus-2.2.0.gem.sha512
147
149
  - lib/spectus.rb
148
150
  - lib/spectus/challenge.rb
149
151
  - lib/spectus/expectation_target.rb
@@ -177,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
179
  version: '0'
178
180
  requirements: []
179
181
  rubyforge_project:
180
- rubygems_version: 2.4.5
182
+ rubygems_version: 2.4.5.1
181
183
  signing_key:
182
184
  specification_version: 4
183
185
  summary: Expectation library with RFC 2119 keywords.
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- 9)m��|V��=����ħ4���AcH h��AD��C{Yt}��]��lM���?�� e$�d�ƛ��RO�j�E�O3��AFm�G�`��^�-OJ�X�"^�q�������G�%�cKλaY/�ڢ}�b|�1'����Z�%�8ۺe1��|�p"
2
- ��<�ݦ��'�T�֬eׂ��6,�^�"��2 <���$�����_��� �«�|�Z'���W�*�����/n��x74B˗»h0aʴ�
1
+ �+�:A��鏡(�K9ҝ�d��䉨�Q��������%��OoUoZ$��S��ߋٹܪA)�W1��rɴ�uh���+C���>�N�ޘ�_fSbf��HAZ��B�J��=�؍�ma���N��㤯W��
2
+  �({]���V��'�<Lt���Օ�0 ��he���|�q ��{��_�� Hxr����o�R�=� S`_��� �N�