rspec-sleeping_king_studios 2.0.0 → 2.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7e72df0f566662437df3f58bbdc76501758e216
4
- data.tar.gz: 5000d6418faef23c63da27b16df98a19f0d81be9
3
+ metadata.gz: e15c55731182411a98203f48327a37c8bfade042
4
+ data.tar.gz: 6ade1136197ac618a4551b2f2c7f9845b35832c7
5
5
  SHA512:
6
- metadata.gz: b4eab840950190c523e71c0e568fa82037b3151f16abbfa34e00f28a4b622843b7d6ee15ff2f906396a7919488a40357e88a5a065d21b7a76fd4ac2f1104f2d9
7
- data.tar.gz: 0f251d04080ce3fd48db5d47aff27817ec2172d8a4de96695dc599ae095788b7cbb722e7b46fc74df36157e32b0f07f1960dc68c7a31447bc8cadf36f8ddd035
6
+ metadata.gz: ce9912aa7af89a8c55363d716506ce91dbbd4db7ecb4f31f0a12ddd90015800a93ab8e4b63ac6f3d8381575cc68540e0471fc80132b729cbf67a0707c34f5211
7
+ data.tar.gz: 3b1ee772ab9e74bdb0176988efeb1a636716f6575cec3bf84a2a73a586235a7554458b0531069ea5f7c1e973d3a3088be60c909d2ae843539e8a55bb99b82e30
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.1
4
+
5
+ Created suite of [Cucumber features](features) to validate and document the gem.
6
+
7
+ #### `construct` Matcher
8
+
9
+ Aliased as `be_constructible` for more fluent specs, and the error messages have been changed from 'expected ... to construct' to 'expected ... to be constructible'.
10
+
3
11
  ## 2.0.0
4
12
 
5
13
  Update the entire library to support RSpec 3. Most of the updates are purely internal, but there are a few changes that are not backward compatible to be aware of.
@@ -4,9 +4,30 @@
4
4
 
5
5
  ### Release Candidate
6
6
 
7
- ### Post 2.0.0
7
+ ### 2.0.1
8
8
 
9
- - Add minimal test formatter - --format=smoke ? --format=librarian?
10
- - Cucumber features for testing matchers, including returned text?
11
- - add shared examples for #belongs_to, #has_one, #has_many, #embedded_in, #embeds_one, #embeds_many.
12
- - add shared examples for core ActiveModel validations.
9
+ - Add cucumber features
10
+ - Matcher features, including returned text DONE
11
+ - Concern features DONE
12
+ - Shared examples features DONE
13
+ - Alias `construct` as `be_constructable`.
14
+ - Rewrite failure messages "to construct" => "to be constructable".
15
+
16
+ ### 2.1.0+
17
+
18
+ - Add #wrap_context, #wrap_examples (alias encapsulate_X ?) for pattern `describe ""; include_examples "": end`
19
+ - Configuration option 'alias_wrap_examples'?
20
+ - Add shared examples for #belongs_to, #has_one, #has_many, #embedded_in, #embeds_one, #embeds_many.
21
+ - Add shared examples for core ActiveModel validations.
22
+
23
+ ### 2.2.0+
24
+
25
+ - Add alt doc test formatted - --format=list ? --format=documentation-list ?
26
+ - Prints full expanded example name for each example
27
+ - Add minimal test formatter - --format=smoke ? --format=librarian ?
28
+ - Prints nothing for examples
29
+ - Suppress STDOUT output? As configurable option for any formatted?
30
+
31
+ ### 3.0.0
32
+
33
+ - Ensure behavior of `#have_reader`, `#have_writer`, `#have_property` is consistent.
data/README.md CHANGED
@@ -4,12 +4,15 @@ A collection of matchers and extensions to ease TDD/BDD using RSpec. Extends bui
4
4
 
5
5
  ## Support
6
6
 
7
- RSpec::SleepingKingStudios is tested against RSpec 3.0 and 3.1.
7
+ RSpec::SleepingKingStudios is tested against RSpec 3.0, 3.1, and 3.2.
8
8
 
9
9
  Currently, the following versions of Ruby are officially supported:
10
10
 
11
- * 2.0.0
12
- * 2.1.0
11
+ * 2.0
12
+ * 2.1
13
+ * 2.2
14
+
15
+ If you require a previous version of Ruby or RSpec, the 1.0 branch supports Ruby 1.9.3 and RSpec 2: `gem "rspec-sleeping_king_studios", "~> 1.0.1"`.
13
16
 
14
17
  ## Contribute
15
18
 
@@ -37,7 +40,7 @@ RSpec::SleepingKingStudios now has configuration options available through `RSpe
37
40
 
38
41
  #### Handle Missing Failure Message With
39
42
 
40
- This option is used with the RSpec matcher examples (see Examples, below), and determines the behavior when a matcher is expected to fail, but the corresponding failure message is not defined (via `let(:failure_message)` or `let(:failure_message_when_negated)`). The default option is `:pending`, which marks the generated example as skipped (and will show up as pending in the formatter). Other options include `:skip`, which marks the generated example as passing, and `:exception`, which marks the generated example as failing.
43
+ This option is used with the RSpec matcher examples (see Examples, below), and determines the behavior when a matcher is expected to fail, but the corresponding failure message is not defined (via `let(:failure_message)` or `let(:failure_message_when_negated)`). The default option is `:pending`, which marks the generated example as skipped (and will show up as pending in the formatter). Other options include `:ignore`, which marks the generated example as passing, and `:exception`, which marks the generated example as failing.
41
44
 
42
45
  ## Concerns
43
46
 
@@ -254,6 +254,9 @@ module RSpec::SleepingKingStudios::Matchers::ActiveModel
254
254
 
255
255
  def received_errors_message
256
256
  return "" unless @validates
257
+
258
+ return "\n received errors:\n (none)" if @actual.errors.messages.empty?
259
+
257
260
  "\n received errors:" + @actual.errors.messages.map do |attr, ary|
258
261
  "\n #{attr}: " + ary.map(&:inspect).join(", ")
259
262
  end.join # map
@@ -85,14 +85,14 @@ module RSpec::SleepingKingStudios::Matchers::Core
85
85
 
86
86
  # (see BaseMatcher#failure_message)
87
87
  def failure_message
88
- message = "expected #{@actual.inspect} to construct"
88
+ message = "expected #{@actual.inspect} to be constructible"
89
89
  message << " with arguments:\n#{format_errors}" if @actual.respond_to?(:new)
90
90
  message
91
91
  end # method failure_message
92
92
 
93
93
  # (see BaseMatcher#failure_message_when_negated)
94
94
  def failure_message_when_negated
95
- message = "expected #{@actual.inspect} not to construct"
95
+ message = "expected #{@actual.inspect} not to be constructible"
96
96
  unless (formatted = format_expected_arguments).empty?
97
97
  message << " with #{formatted}"
98
98
  end # unless
@@ -165,4 +165,5 @@ module RSpec::SleepingKingStudios::Matchers
165
165
  def construct
166
166
  RSpec::SleepingKingStudios::Matchers::Core::ConstructMatcher.new
167
167
  end # method construct
168
+ alias_method :be_constructible, :construct
168
169
  end # module
@@ -53,7 +53,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
53
53
 
54
54
  # (see BaseMatcher#failure_message)
55
55
  def failure_message
56
- message = "expected #{@actual} to respond to :#{@expected}"
56
+ message = "expected #{@actual.inspect} to respond to :#{@expected}"
57
57
  message << " and return #{value_to_string}" if @value_set
58
58
 
59
59
  if !@matches_reader
@@ -67,7 +67,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
67
67
 
68
68
  # (see BaseMatcher#failure_message_when_negated)
69
69
  def failure_message_when_negated
70
- message = "expected #{@actual} not to respond to :#{@expected}"
70
+ message = "expected #{@actual.inspect} not to respond to :#{@expected}"
71
71
  message << " and return #{value_to_string}" if @value_set
72
72
  message
73
73
  end # method failure_message
@@ -53,7 +53,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
53
53
 
54
54
  # @see BaseMatcher#failure_message_when_negated
55
55
  def failure_message_when_negated
56
- "expected #{@actual} not to respond to :#{@expected}="
56
+ "expected #{@actual.inspect} not to respond to :#{@expected}="
57
57
  end # method failure_message
58
58
  end # class
59
59
  end # module
@@ -13,7 +13,7 @@ module RSpec
13
13
  # Minor version.
14
14
  MINOR = 0
15
15
  # Patch version.
16
- PATCH = 0
16
+ PATCH = 1
17
17
  # Prerelease version.
18
18
  PRERELEASE = nil
19
19
  # Build metadata.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-sleeping_king_studios
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob "Merlin" Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-06 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -112,6 +112,46 @@ dependencies:
112
112
  - - "~>"
113
113
  - !ruby/object:Gem::Version
114
114
  version: '10.3'
115
+ - !ruby/object:Gem::Dependency
116
+ name: aruba
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - "~>"
120
+ - !ruby/object:Gem::Version
121
+ version: '0.6'
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 0.6.2
125
+ type: :development
126
+ prerelease: false
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.6'
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: 0.6.2
135
+ - !ruby/object:Gem::Dependency
136
+ name: cucumber
137
+ requirement: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '1.3'
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: 1.3.19
145
+ type: :development
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '1.3'
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: 1.3.19
115
155
  - !ruby/object:Gem::Dependency
116
156
  name: activemodel
117
157
  requirement: !ruby/object:Gem::Requirement
@@ -204,3 +244,4 @@ signing_key:
204
244
  specification_version: 4
205
245
  summary: A collection of RSpec patches and custom matchers.
206
246
  test_files: []
247
+ has_rdoc: