rspec-expectations 3.0.0.beta2 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +2 -2
  4. data/.yardopts +0 -1
  5. data/Changelog.md +115 -35
  6. data/README.md +2 -2
  7. data/lib/rspec/expectations.rb +13 -8
  8. data/lib/rspec/{matchers → expectations}/configuration.rb +38 -13
  9. data/lib/rspec/expectations/expectation_target.rb +72 -8
  10. data/lib/rspec/expectations/fail_with.rb +10 -52
  11. data/lib/rspec/expectations/handler.rb +9 -11
  12. data/lib/rspec/expectations/syntax.rb +37 -35
  13. data/lib/rspec/expectations/version.rb +1 -1
  14. data/lib/rspec/matchers.rb +60 -9
  15. data/lib/rspec/matchers/aliased_matcher.rb +6 -0
  16. data/lib/rspec/matchers/built_in.rb +9 -1
  17. data/lib/rspec/matchers/built_in/all.rb +78 -0
  18. data/lib/rspec/matchers/built_in/base_matcher.rb +39 -1
  19. data/lib/rspec/matchers/built_in/be.rb +117 -42
  20. data/lib/rspec/matchers/built_in/be_between.rb +22 -0
  21. data/lib/rspec/matchers/built_in/be_instance_of.rb +11 -3
  22. data/lib/rspec/matchers/built_in/be_kind_of.rb +5 -0
  23. data/lib/rspec/matchers/built_in/be_within.rb +26 -6
  24. data/lib/rspec/matchers/built_in/change.rb +89 -13
  25. data/lib/rspec/matchers/built_in/compound.rb +19 -3
  26. data/lib/rspec/matchers/built_in/contain_exactly.rb +17 -6
  27. data/lib/rspec/matchers/built_in/cover.rb +3 -0
  28. data/lib/rspec/matchers/built_in/eq.rb +20 -5
  29. data/lib/rspec/matchers/built_in/eql.rb +15 -3
  30. data/lib/rspec/matchers/built_in/equal.rb +23 -6
  31. data/lib/rspec/matchers/built_in/exist.rb +74 -10
  32. data/lib/rspec/matchers/built_in/has.rb +58 -3
  33. data/lib/rspec/matchers/built_in/include.rb +16 -1
  34. data/lib/rspec/matchers/built_in/match.rb +14 -4
  35. data/lib/rspec/matchers/built_in/operators.rb +16 -0
  36. data/lib/rspec/matchers/built_in/output.rb +47 -5
  37. data/lib/rspec/matchers/built_in/raise_error.rb +40 -23
  38. data/lib/rspec/matchers/built_in/respond_to.rb +37 -16
  39. data/lib/rspec/matchers/built_in/satisfy.rb +15 -0
  40. data/lib/rspec/matchers/built_in/start_and_end_with.rb +29 -14
  41. data/lib/rspec/matchers/built_in/throw_symbol.rb +32 -3
  42. data/lib/rspec/matchers/built_in/yield.rb +148 -44
  43. data/lib/rspec/matchers/composable.rb +48 -7
  44. data/lib/rspec/matchers/dsl.rb +45 -17
  45. data/lib/rspec/matchers/generated_descriptions.rb +7 -0
  46. data/lib/rspec/matchers/matcher_delegator.rb +6 -2
  47. data/lib/rspec/matchers/pretty.rb +15 -19
  48. metadata +33 -236
  49. metadata.gz.sig +0 -0
  50. data/features/README.md +0 -48
  51. data/features/Upgrade.md +0 -53
  52. data/features/built_in_matchers/README.md +0 -96
  53. data/features/built_in_matchers/be.feature +0 -175
  54. data/features/built_in_matchers/be_within.feature +0 -48
  55. data/features/built_in_matchers/comparisons.feature +0 -97
  56. data/features/built_in_matchers/contain_exactly.feature +0 -46
  57. data/features/built_in_matchers/cover.feature +0 -47
  58. data/features/built_in_matchers/end_with.feature +0 -48
  59. data/features/built_in_matchers/equality.feature +0 -136
  60. data/features/built_in_matchers/exist.feature +0 -45
  61. data/features/built_in_matchers/expect_change.feature +0 -59
  62. data/features/built_in_matchers/expect_error.feature +0 -144
  63. data/features/built_in_matchers/include.feature +0 -126
  64. data/features/built_in_matchers/match.feature +0 -51
  65. data/features/built_in_matchers/output.feature +0 -70
  66. data/features/built_in_matchers/predicates.feature +0 -161
  67. data/features/built_in_matchers/respond_to.feature +0 -84
  68. data/features/built_in_matchers/satisfy.feature +0 -33
  69. data/features/built_in_matchers/start_with.feature +0 -48
  70. data/features/built_in_matchers/throw_symbol.feature +0 -91
  71. data/features/built_in_matchers/types.feature +0 -116
  72. data/features/built_in_matchers/yield.feature +0 -161
  73. data/features/composing_matchers.feature +0 -250
  74. data/features/compound_expectations.feature +0 -45
  75. data/features/custom_matchers/access_running_example.feature +0 -53
  76. data/features/custom_matchers/define_diffable_matcher.feature +0 -27
  77. data/features/custom_matchers/define_matcher.feature +0 -340
  78. data/features/custom_matchers/define_matcher_outside_rspec.feature +0 -34
  79. data/features/custom_matchers/define_matcher_with_fluent_interface.feature +0 -24
  80. data/features/customized_message.feature +0 -39
  81. data/features/diffing.feature +0 -85
  82. data/features/implicit_docstrings.feature +0 -52
  83. data/features/step_definitions/additional_cli_steps.rb +0 -22
  84. data/features/support/env.rb +0 -21
  85. data/features/support/rubinius.rb +0 -6
  86. data/features/syntax_configuration.feature +0 -71
  87. data/features/test_frameworks/minitest.feature +0 -44
  88. data/lib/rspec-expectations.rb +0 -1
  89. data/lib/rspec/expectations/diff_presenter.rb +0 -141
  90. data/lib/rspec/expectations/differ.rb +0 -44
  91. data/lib/rspec/expectations/encoded_string.rb +0 -56
  92. data/spec/rspec/expectations/diff_presenter_spec.rb +0 -249
  93. data/spec/rspec/expectations/encoded_string_spec.rb +0 -74
  94. data/spec/rspec/expectations/expectation_target_spec.rb +0 -82
  95. data/spec/rspec/expectations/extensions/kernel_spec.rb +0 -67
  96. data/spec/rspec/expectations/fail_with_spec.rb +0 -114
  97. data/spec/rspec/expectations/handler_spec.rb +0 -205
  98. data/spec/rspec/expectations/minitest_integration_spec.rb +0 -27
  99. data/spec/rspec/expectations/syntax_spec.rb +0 -89
  100. data/spec/rspec/expectations_spec.rb +0 -12
  101. data/spec/rspec/matchers/aliased_matcher_spec.rb +0 -48
  102. data/spec/rspec/matchers/aliases_spec.rb +0 -449
  103. data/spec/rspec/matchers/built_in/base_matcher_spec.rb +0 -83
  104. data/spec/rspec/matchers/built_in/be_between_spec.rb +0 -159
  105. data/spec/rspec/matchers/built_in/be_instance_of_spec.rb +0 -63
  106. data/spec/rspec/matchers/built_in/be_kind_of_spec.rb +0 -41
  107. data/spec/rspec/matchers/built_in/be_spec.rb +0 -592
  108. data/spec/rspec/matchers/built_in/be_within_spec.rb +0 -141
  109. data/spec/rspec/matchers/built_in/change_spec.rb +0 -808
  110. data/spec/rspec/matchers/built_in/compound_spec.rb +0 -292
  111. data/spec/rspec/matchers/built_in/contain_exactly_spec.rb +0 -441
  112. data/spec/rspec/matchers/built_in/cover_spec.rb +0 -69
  113. data/spec/rspec/matchers/built_in/eq_spec.rb +0 -156
  114. data/spec/rspec/matchers/built_in/eql_spec.rb +0 -41
  115. data/spec/rspec/matchers/built_in/equal_spec.rb +0 -106
  116. data/spec/rspec/matchers/built_in/exist_spec.rb +0 -124
  117. data/spec/rspec/matchers/built_in/has_spec.rb +0 -161
  118. data/spec/rspec/matchers/built_in/include_spec.rb +0 -540
  119. data/spec/rspec/matchers/built_in/match_spec.rb +0 -102
  120. data/spec/rspec/matchers/built_in/operators_spec.rb +0 -252
  121. data/spec/rspec/matchers/built_in/output_spec.rb +0 -165
  122. data/spec/rspec/matchers/built_in/raise_error_spec.rb +0 -461
  123. data/spec/rspec/matchers/built_in/respond_to_spec.rb +0 -292
  124. data/spec/rspec/matchers/built_in/satisfy_spec.rb +0 -44
  125. data/spec/rspec/matchers/built_in/start_and_end_with_spec.rb +0 -253
  126. data/spec/rspec/matchers/built_in/throw_symbol_spec.rb +0 -135
  127. data/spec/rspec/matchers/built_in/yield_spec.rb +0 -627
  128. data/spec/rspec/matchers/configuration_spec.rb +0 -213
  129. data/spec/rspec/matchers/description_generation_spec.rb +0 -191
  130. data/spec/rspec/matchers/dsl_spec.rb +0 -895
  131. data/spec/rspec/matchers/legacy_spec.rb +0 -101
  132. data/spec/rspec/matchers_spec.rb +0 -74
  133. data/spec/spec_helper.rb +0 -85
  134. data/spec/support/matchers.rb +0 -22
  135. data/spec/support/shared_examples.rb +0 -35
@@ -1,4 +1,4 @@
1
- require 'rspec/support/fuzzy_matcher'
1
+ RSpec::Support.require_rspec_support "fuzzy_matcher"
2
2
 
3
3
  module RSpec
4
4
  module Matchers
@@ -15,12 +15,14 @@ module RSpec
15
15
  #
16
16
  # @example
17
17
  # expect(alphabet).to start_with("a").and end_with("z")
18
+ # expect(alphabet).to start_with("a") & end_with("z")
18
19
  #
19
20
  # @note The negative form (`expect(...).not_to matcher.and other`)
20
21
  # is not supported at this time.
21
22
  def and(matcher)
22
23
  BuiltIn::Compound::And.new self, matcher
23
24
  end
25
+ alias & and
24
26
 
25
27
  # Creates a compound `or` expectation. The matcher will
26
28
  # pass if either sub-matcher passes.
@@ -29,12 +31,14 @@ module RSpec
29
31
  #
30
32
  # @example
31
33
  # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow")
34
+ # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow")
32
35
  #
33
36
  # @note The negative form (`expect(...).not_to matcher.or other`)
34
37
  # is not supported at this time.
35
38
  def or(matcher)
36
39
  BuiltIn::Compound::Or.new self, matcher
37
40
  end
41
+ alias | or
38
42
 
39
43
  # Delegates to `#matches?`. Allows matchers to be used in composable
40
44
  # fashion and also supports using matchers in case statements.
@@ -42,7 +46,7 @@ module RSpec
42
46
  matches?(value)
43
47
  end
44
48
 
45
- private unless defined?(::YARD)
49
+ private
46
50
 
47
51
  # This provides a generic way to fuzzy-match an expected value against
48
52
  # an actual value. It understands nested data structures (e.g. hashes
@@ -58,8 +62,9 @@ module RSpec
58
62
  # @param expected [Object] what is expected
59
63
  # @param actual [Object] the actual value
60
64
  #
61
- # @public
65
+ # @!visibility public
62
66
  def values_match?(expected, actual)
67
+ expected = with_matchers_cloned(expected)
63
68
  Support::FuzzyMatcher.values_match?(expected, actual)
64
69
  end
65
70
 
@@ -73,7 +78,7 @@ module RSpec
73
78
  # `failure_message_when_negated` implementation if you are
74
79
  # supporting matcher arguments.
75
80
  #
76
- # @api public
81
+ # @!visibility public
77
82
  def description_of(object)
78
83
  return object.description if Matchers.is_a_describable_matcher?(object)
79
84
  object.inspect
@@ -90,19 +95,55 @@ module RSpec
90
95
  # supporting any arguments which may be a data structure
91
96
  # containing matchers.
92
97
  #
93
- # @api public
98
+ # @!visibility public
94
99
  def surface_descriptions_in(item)
95
100
  if Matchers.is_a_describable_matcher?(item)
96
101
  DescribableItem.new(item)
97
102
  elsif Hash === item
98
103
  Hash[ surface_descriptions_in(item.to_a) ]
99
104
  elsif enumerable?(item)
100
- item.map { |subitem| surface_descriptions_in(subitem) }
105
+ begin
106
+ item.map { |subitem| surface_descriptions_in(subitem) }
107
+ rescue IOError # STDOUT is enumerable but `map` raises an error
108
+ item.inspect
109
+ end
101
110
  else
102
111
  item
103
112
  end
104
113
  end
105
114
 
115
+ # @private
116
+ # Historically, a single matcher instance was only checked
117
+ # against a single value. Given that the matcher was only
118
+ # used once, it's been common to memoize some intermediate
119
+ # calculation that is derived from the `actual` value in
120
+ # order to reuse that intermediate result in the failure
121
+ # message.
122
+ #
123
+ # This can cause a problem when using such a matcher as an
124
+ # argument to another matcher in a composed matcher expression,
125
+ # since the matcher instance may be checked against multiple
126
+ # values and produce invalid results due to the memoization.
127
+ #
128
+ # To deal with this, we clone any matchers in `expected` via
129
+ # this method when using `values_match?`, so that any memoization
130
+ # does not "leak" between checks.
131
+ def with_matchers_cloned(object)
132
+ if Matchers.is_a_matcher?(object)
133
+ object.clone
134
+ elsif Hash === object
135
+ Hash[ with_matchers_cloned(object.to_a) ]
136
+ elsif enumerable?(object)
137
+ begin
138
+ object.map { |subobject| with_matchers_cloned(subobject) }
139
+ rescue IOError # STDOUT is enumerable but `map` raises an error
140
+ object
141
+ end
142
+ else
143
+ object
144
+ end
145
+ end
146
+
106
147
  if String.ancestors.include?(Enumerable) # 1.8.7
107
148
  # Strings are not enumerable on 1.9, and on 1.8 they are an infinitely
108
149
  # nested enumerable: since ruby lacks a character class, it yields
@@ -120,7 +161,7 @@ module RSpec
120
161
  Enumerable === item
121
162
  end
122
163
  end
123
- module_function :surface_descriptions_in, :enumerable? unless defined?(::YARD)
164
+ module_function :surface_descriptions_in, :enumerable?
124
165
 
125
166
  # Wraps an item in order to surface its `description` via `inspect`.
126
167
  # @api private
@@ -1,16 +1,14 @@
1
1
  module RSpec
2
2
  module Matchers
3
+ # Defines the custom matcher DSL.
3
4
  module DSL
4
5
  # Defines a custom matcher.
5
6
  # @see RSpec::Matchers
6
7
  def define(name, &declarations)
7
8
  define_method name do |*expected|
8
- matcher = RSpec::Matchers::DSL::Matcher.new(name, declarations, *expected)
9
- matcher.matcher_execution_context = @matcher_execution_context ||= self
10
- matcher
9
+ RSpec::Matchers::DSL::Matcher.new(name, declarations, self, *expected)
11
10
  end
12
11
  end
13
-
14
12
  alias_method :matcher, :define
15
13
 
16
14
  if RSpec.respond_to?(:configure)
@@ -153,6 +151,14 @@ module RSpec
153
151
  define_method(:diffable?) { true }
154
152
  end
155
153
 
154
+ # Declares that the matcher can be used in a block expectation.
155
+ # Users will not be able to use your matcher in a block
156
+ # expectation without declaring this.
157
+ # (e.g. `expect { do_something }.to matcher`).
158
+ def supports_block_expectations
159
+ define_method(:supports_block_expectations?) { true }
160
+ end
161
+
156
162
  # Convenience for defining methods on this matcher to create a fluent
157
163
  # interface. The trick about fluent interfaces is that each method must
158
164
  # return self in order to chain methods together. `chain` handles that
@@ -245,17 +251,23 @@ module RSpec
245
251
 
246
252
  # The default description.
247
253
  def description
248
- "#{name_to_sentence}#{expected_to_sentence}"
254
+ "#{name_to_sentence}#{to_sentence expected}"
249
255
  end
250
256
 
251
257
  # The default failure message for positive expectations.
252
258
  def failure_message
253
- "expected #{actual.inspect} to #{name_to_sentence}#{expected_to_sentence}"
259
+ "expected #{actual.inspect} to #{name_to_sentence}#{to_sentence expected}"
254
260
  end
255
261
 
256
262
  # The default failure message for negative expectations.
257
263
  def failure_message_when_negated
258
- "expected #{actual.inspect} not to #{name_to_sentence}#{expected_to_sentence}"
264
+ "expected #{actual.inspect} not to #{name_to_sentence}#{to_sentence expected}"
265
+ end
266
+
267
+ # Matchers do not support block expectations by default. You
268
+ # must opt-in.
269
+ def supports_block_expectations?
270
+ false
259
271
  end
260
272
  end
261
273
 
@@ -280,14 +292,20 @@ module RSpec
280
292
  extend Macros
281
293
  extend Macros::Deprecated
282
294
 
283
- attr_reader :expected_as_array, :actual, :rescued_exception
284
- attr_accessor :matcher_execution_context
295
+ # Exposes the value being matched against -- generally the object
296
+ # object wrapped by `expect`.
297
+ attr_reader :actual
298
+
299
+ # Exposes the exception raised during the matching by `match_unless_raises`.
300
+ # Could be useful to extract details for a failure message.
301
+ attr_reader :rescued_exception
285
302
 
286
303
  # @api private
287
- def initialize(name, declarations, *expected)
304
+ def initialize(name, declarations, matcher_execution_context, *expected)
288
305
  @name = name
289
306
  @actual = nil
290
307
  @expected_as_array = expected
308
+ @matcher_execution_context = matcher_execution_context
291
309
 
292
310
  class << self
293
311
  # See `Macros#define_user_override` above, for an explanation.
@@ -296,6 +314,10 @@ module RSpec
296
314
  end.class_exec(*expected, &declarations)
297
315
  end
298
316
 
317
+ # Provides the expected value. This will return an array if
318
+ # multiple arguments were passed to the matcher; otherwise it
319
+ # will return a single value.
320
+ # @see #expected_as_array
299
321
  def expected
300
322
  if expected_as_array.size == 1
301
323
  expected_as_array[0]
@@ -304,6 +326,12 @@ module RSpec
304
326
  end
305
327
  end
306
328
 
329
+ # Returns the expected value as an an array. This exists primarily
330
+ # to aid in upgrading from RSpec 2.x, since in RSpec 2, `expected`
331
+ # always returned an array.
332
+ # @see #expected
333
+ attr_reader :expected_as_array
334
+
307
335
  # Adds the name (rather than a cryptic hex number)
308
336
  # so we can identify an instance of
309
337
  # the matcher in error messages (e.g. for `NoMethodError`)
@@ -313,16 +341,16 @@ module RSpec
313
341
 
314
342
  if RUBY_VERSION.to_f >= 1.9
315
343
  # Indicates that this matcher responds to messages
316
- # from the `matcher_execution_context` as well.
344
+ # from the `@matcher_execution_context` as well.
317
345
  # Also, supports getting a method object for such methods.
318
346
  def respond_to_missing?(method, include_private=false)
319
- super || matcher_execution_context.respond_to?(method, include_private)
347
+ super || @matcher_execution_context.respond_to?(method, include_private)
320
348
  end
321
349
  else # for 1.8.7
322
350
  # Indicates that this matcher responds to messages
323
- # from the `matcher_execution_context` as well.
351
+ # from the `@matcher_execution_context` as well.
324
352
  def respond_to?(method, include_private=false)
325
- super || matcher_execution_context.respond_to?(method, include_private)
353
+ super || @matcher_execution_context.respond_to?(method, include_private)
326
354
  end
327
355
  end
328
356
 
@@ -333,14 +361,14 @@ module RSpec
333
361
  end
334
362
 
335
363
  # Takes care of forwarding unhandled messages to the
336
- # `matcher_execution_context` (typically the current
364
+ # `@matcher_execution_context` (typically the current
337
365
  # running `RSpec::Core::Example`). This is needed by
338
366
  # rspec-rails so that it can define matchers that wrap
339
367
  # Rails' test helper methods, but it's also a useful
340
368
  # feature in its own right.
341
369
  def method_missing(method, *args, &block)
342
- if matcher_execution_context.respond_to?(method)
343
- matcher_execution_context.__send__ method, *args, &block
370
+ if @matcher_execution_context.respond_to?(method)
371
+ @matcher_execution_context.__send__ method, *args, &block
344
372
  else
345
373
  super(method, *args, &block)
346
374
  end
@@ -1,14 +1,21 @@
1
1
  module RSpec
2
2
  module Matchers
3
3
  class << self
4
+ # @private
4
5
  attr_accessor :last_matcher, :last_expectation_handler
5
6
  end
6
7
 
8
+ # @api private
9
+ # Used by rspec-core to clear the state used to generate
10
+ # descriptions after an example.
7
11
  def self.clear_generated_description
8
12
  self.last_matcher = nil
9
13
  self.last_expectation_handler = nil
10
14
  end
11
15
 
16
+ # @api private
17
+ # Generates an an example description based on the last expectation.
18
+ # Used by rspec-core's one-liner syntax.
12
19
  def self.generated_description
13
20
  return nil if last_expectation_handler.nil?
14
21
  "#{last_expectation_handler.verb} #{last_description}"
@@ -1,8 +1,7 @@
1
1
  module RSpec
2
2
  module Matchers
3
3
  # Provides the necessary plumbing to wrap a matcher with a decorator.
4
- #
5
- # @api private
4
+ # @private
6
5
  class MatcherDelegator
7
6
  attr_reader :base_matcher
8
7
 
@@ -24,6 +23,11 @@ module RSpec
24
23
  end
25
24
  end
26
25
 
26
+ def initialize_copy(other)
27
+ @base_matcher = @base_matcher.clone
28
+ super
29
+ end
30
+
27
31
  # So `===` is delegated via `method_missing`.
28
32
  undef ===
29
33
  undef ==
@@ -1,11 +1,18 @@
1
1
  module RSpec
2
2
  module Matchers
3
+ # @api private
4
+ # Contains logic to facilitate converting ruby symbols and
5
+ # objects to english phrases.
3
6
  module Pretty
7
+ # @api private
8
+ # Converts a symbol into an english expression.
4
9
  def split_words(sym)
5
10
  sym.to_s.gsub(/_/,' ')
6
11
  end
7
12
  module_function :split_words
8
13
 
14
+ # @api private
15
+ # Converts a collection of objects into an english expression.
9
16
  def to_sentence(words)
10
17
  return " #{words.inspect}" unless words
11
18
  words = Array(words).map { |w| to_word(w) }
@@ -21,36 +28,25 @@ module RSpec
21
28
  end
22
29
  end
23
30
 
24
- def _pretty_print(array)
25
- result = ""
26
- array.each_with_index do |item, index|
27
- if index < (array.length - 2)
28
- result << "#{item.inspect}, "
29
- elsif index < (array.length - 1)
30
- result << "#{item.inspect} and "
31
- else
32
- result << "#{item.inspect}"
33
- end
34
- end
35
- result
36
- end
37
-
31
+ # @api private
32
+ # Converts the given item to string suitable for use in a list expression.
38
33
  def to_word(item)
39
34
  is_matcher_with_description?(item) ? item.description : item.inspect
40
35
  end
41
36
 
37
+ # @private
38
+ # Provides an English expression for the matcher name.
42
39
  def name_to_sentence
43
40
  split_words(name)
44
41
  end
45
42
 
46
- def expected_to_sentence
47
- to_sentence(expected) if defined?(expected)
48
- end
49
-
43
+ # @api private
44
+ # Provides a name for the matcher.
50
45
  def name
51
46
  defined?(@name) ? @name : underscore(self.class.name.split("::").last)
52
47
  end
53
48
 
49
+ # @private
54
50
  # Borrowed from ActiveSupport
55
51
  def underscore(camel_cased_word)
56
52
  word = camel_cased_word.to_s.dup
@@ -61,7 +57,7 @@ module RSpec
61
57
  word
62
58
  end
63
59
 
64
- private
60
+ private
65
61
 
66
62
  def is_matcher_with_description?(object)
67
63
  RSpec::Matchers.is_a_matcher?(object) && object.respond_to?(:description)
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta2
5
- prerelease: 6
4
+ version: 3.0.0.rc1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Steven Baker
@@ -11,153 +10,119 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain:
14
- - ! '-----BEGIN CERTIFICATE-----
15
-
13
+ - |
14
+ -----BEGIN CERTIFICATE-----
16
15
  MIIDjjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQUFADBGMRIwEAYDVQQDDAlyc3Bl
17
-
18
16
  Yy1kZXYxGzAZBgoJkiaJk/IsZAEZFgtnb29nbGVnb3VwczETMBEGCgmSJomT8ixk
19
-
20
17
  ARkWA2NvbTAeFw0xMzExMDcxOTQyNTlaFw0xNDExMDcxOTQyNTlaMEYxEjAQBgNV
21
-
22
18
  BAMMCXJzcGVjLWRldjEbMBkGCgmSJomT8ixkARkWC2dvb2dsZWdvdXBzMRMwEQYK
23
-
24
19
  CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
25
-
26
20
  nhCeZouDLXWO55no+EdZNCtjXjfJQ1X9TbPcvBDD29OypIUce2h/VdKXB2gI7ZHs
27
-
28
21
  F5NkPggslTErGFmWAtIiur7u943RVqHOsyoIsy065F9fCtrykkA+22elvTDha4Iz
29
-
30
22
  RUCvuhQ3klatYk4jF+cGt1jNONNVdLOiy0bMynvcM7hoVQ2AomwGs+cEOWQ/4dkD
31
-
32
23
  JcNV3qfzF5QBcTD2372XNM53b25nYVQSX2KH5FF7BhlKyov33bOm2gA9M+mWIujW
33
-
34
24
  qgkyxVlfrlE+ZBgV3wXn1Cojg1LpTq35yOArgwioyrwwlZZJR9joN9s/nDklfr5A
35
-
36
25
  +dyETjFc6cmEPWZrt2cJBQIDAQABo4GGMIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQD
37
-
38
26
  AgSwMB0GA1UdDgQWBBSW+WD7hn1swJ1A7i8tbuFeuNCJCjAkBgNVHREEHTAbgRly
39
-
40
27
  c3BlYy1kZXZAZ29vZ2xlZ291cHMuY29tMCQGA1UdEgQdMBuBGXJzcGVjLWRldkBn
41
-
42
28
  b29nbGVnb3Vwcy5jb20wDQYJKoZIhvcNAQEFBQADggEBAH27jAZ8sD7vnXupj6Y+
43
-
44
29
  BaBdfHtCkFaslLJ0aKuMDIVXwYuKfqoW15cZPDLmSIEBuQFM3lw6d/hEEL4Uo2jZ
45
-
46
30
  FvtmH5OxifPDzFyUtCL4yp6qgNe/Xf6sDsRg6FmKcpgqCwNOmsViaf0LPSUH/GYQ
47
-
48
31
  3Teoz8QCaDbD7AKsffT7eDrnbHnKweO1XdemRJC98u/yYxnGzMSWKEsn09etBlZ9
49
-
50
32
  7H67k5Z3uf6cfLZgToWL6zShzZY3Nun5r73YsNf2/QZOe4UZe4vfGvn6baw53ys9
51
-
52
33
  1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
53
-
54
34
  muA=
55
-
56
35
  -----END CERTIFICATE-----
57
-
58
- '
59
- date: 2014-02-18 00:00:00.000000000 Z
36
+ date: 2014-05-18 00:00:00.000000000 Z
60
37
  dependencies:
61
38
  - !ruby/object:Gem::Dependency
62
39
  name: rspec-support
63
40
  requirement: !ruby/object:Gem::Requirement
64
- none: false
65
41
  requirements:
66
42
  - - '='
67
43
  - !ruby/object:Gem::Version
68
- version: 3.0.0.beta2
44
+ version: 3.0.0.rc1
69
45
  type: :runtime
70
46
  prerelease: false
71
47
  version_requirements: !ruby/object:Gem::Requirement
72
- none: false
73
48
  requirements:
74
49
  - - '='
75
50
  - !ruby/object:Gem::Version
76
- version: 3.0.0.beta2
51
+ version: 3.0.0.rc1
77
52
  - !ruby/object:Gem::Dependency
78
53
  name: diff-lcs
79
54
  requirement: !ruby/object:Gem::Requirement
80
- none: false
81
55
  requirements:
82
- - - ! '>='
56
+ - - ">="
83
57
  - !ruby/object:Gem::Version
84
58
  version: 1.2.0
85
- - - <
59
+ - - "<"
86
60
  - !ruby/object:Gem::Version
87
61
  version: '2.0'
88
62
  type: :runtime
89
63
  prerelease: false
90
64
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
65
  requirements:
93
- - - ! '>='
66
+ - - ">="
94
67
  - !ruby/object:Gem::Version
95
68
  version: 1.2.0
96
- - - <
69
+ - - "<"
97
70
  - !ruby/object:Gem::Version
98
71
  version: '2.0'
99
72
  - !ruby/object:Gem::Dependency
100
73
  name: rake
101
74
  requirement: !ruby/object:Gem::Requirement
102
- none: false
103
75
  requirements:
104
- - - ~>
76
+ - - "~>"
105
77
  - !ruby/object:Gem::Version
106
78
  version: 10.0.0
107
79
  type: :development
108
80
  prerelease: false
109
81
  version_requirements: !ruby/object:Gem::Requirement
110
- none: false
111
82
  requirements:
112
- - - ~>
83
+ - - "~>"
113
84
  - !ruby/object:Gem::Version
114
85
  version: 10.0.0
115
86
  - !ruby/object:Gem::Dependency
116
87
  name: cucumber
117
88
  requirement: !ruby/object:Gem::Requirement
118
- none: false
119
89
  requirements:
120
- - - ~>
90
+ - - "~>"
121
91
  - !ruby/object:Gem::Version
122
92
  version: '1.3'
123
93
  type: :development
124
94
  prerelease: false
125
95
  version_requirements: !ruby/object:Gem::Requirement
126
- none: false
127
96
  requirements:
128
- - - ~>
97
+ - - "~>"
129
98
  - !ruby/object:Gem::Version
130
99
  version: '1.3'
131
100
  - !ruby/object:Gem::Dependency
132
101
  name: aruba
133
102
  requirement: !ruby/object:Gem::Requirement
134
- none: false
135
103
  requirements:
136
- - - ~>
104
+ - - "~>"
137
105
  - !ruby/object:Gem::Version
138
106
  version: '0.5'
139
107
  type: :development
140
108
  prerelease: false
141
109
  version_requirements: !ruby/object:Gem::Requirement
142
- none: false
143
110
  requirements:
144
- - - ~>
111
+ - - "~>"
145
112
  - !ruby/object:Gem::Version
146
113
  version: '0.5'
147
114
  - !ruby/object:Gem::Dependency
148
115
  name: minitest
149
116
  requirement: !ruby/object:Gem::Requirement
150
- none: false
151
117
  requirements:
152
- - - ~>
118
+ - - "~>"
153
119
  - !ruby/object:Gem::Version
154
120
  version: '5.2'
155
121
  type: :development
156
122
  prerelease: false
157
123
  version_requirements: !ruby/object:Gem::Requirement
158
- none: false
159
124
  requirements:
160
- - - ~>
125
+ - - "~>"
161
126
  - !ruby/object:Gem::Version
162
127
  version: '5.2'
163
128
  description: rspec-expectations provides a simple, readable API to express expected
@@ -167,11 +132,13 @@ executables: []
167
132
  extensions: []
168
133
  extra_rdoc_files: []
169
134
  files:
170
- - lib/rspec-expectations.rb
135
+ - ".document"
136
+ - ".yardopts"
137
+ - Changelog.md
138
+ - License.txt
139
+ - README.md
171
140
  - lib/rspec/expectations.rb
172
- - lib/rspec/expectations/diff_presenter.rb
173
- - lib/rspec/expectations/differ.rb
174
- - lib/rspec/expectations/encoded_string.rb
141
+ - lib/rspec/expectations/configuration.rb
175
142
  - lib/rspec/expectations/expectation_target.rb
176
143
  - lib/rspec/expectations/fail_with.rb
177
144
  - lib/rspec/expectations/handler.rb
@@ -181,6 +148,7 @@ files:
181
148
  - lib/rspec/matchers.rb
182
149
  - lib/rspec/matchers/aliased_matcher.rb
183
150
  - lib/rspec/matchers/built_in.rb
151
+ - lib/rspec/matchers/built_in/all.rb
184
152
  - lib/rspec/matchers/built_in/base_matcher.rb
185
153
  - lib/rspec/matchers/built_in/be.rb
186
154
  - lib/rspec/matchers/built_in/be_between.rb
@@ -207,205 +175,34 @@ files:
207
175
  - lib/rspec/matchers/built_in/throw_symbol.rb
208
176
  - lib/rspec/matchers/built_in/yield.rb
209
177
  - lib/rspec/matchers/composable.rb
210
- - lib/rspec/matchers/configuration.rb
211
178
  - lib/rspec/matchers/dsl.rb
212
179
  - lib/rspec/matchers/generated_descriptions.rb
213
180
  - lib/rspec/matchers/matcher_delegator.rb
214
181
  - lib/rspec/matchers/pretty.rb
215
- - README.md
216
- - License.txt
217
- - Changelog.md
218
- - .yardopts
219
- - .document
220
- - features/README.md
221
- - features/Upgrade.md
222
- - features/built_in_matchers/README.md
223
- - features/built_in_matchers/be.feature
224
- - features/built_in_matchers/be_within.feature
225
- - features/built_in_matchers/comparisons.feature
226
- - features/built_in_matchers/contain_exactly.feature
227
- - features/built_in_matchers/cover.feature
228
- - features/built_in_matchers/end_with.feature
229
- - features/built_in_matchers/equality.feature
230
- - features/built_in_matchers/exist.feature
231
- - features/built_in_matchers/expect_change.feature
232
- - features/built_in_matchers/expect_error.feature
233
- - features/built_in_matchers/include.feature
234
- - features/built_in_matchers/match.feature
235
- - features/built_in_matchers/output.feature
236
- - features/built_in_matchers/predicates.feature
237
- - features/built_in_matchers/respond_to.feature
238
- - features/built_in_matchers/satisfy.feature
239
- - features/built_in_matchers/start_with.feature
240
- - features/built_in_matchers/throw_symbol.feature
241
- - features/built_in_matchers/types.feature
242
- - features/built_in_matchers/yield.feature
243
- - features/composing_matchers.feature
244
- - features/compound_expectations.feature
245
- - features/custom_matchers/access_running_example.feature
246
- - features/custom_matchers/define_diffable_matcher.feature
247
- - features/custom_matchers/define_matcher.feature
248
- - features/custom_matchers/define_matcher_outside_rspec.feature
249
- - features/custom_matchers/define_matcher_with_fluent_interface.feature
250
- - features/customized_message.feature
251
- - features/diffing.feature
252
- - features/implicit_docstrings.feature
253
- - features/step_definitions/additional_cli_steps.rb
254
- - features/support/env.rb
255
- - features/support/rubinius.rb
256
- - features/syntax_configuration.feature
257
- - features/test_frameworks/minitest.feature
258
- - spec/rspec/expectations/diff_presenter_spec.rb
259
- - spec/rspec/expectations/encoded_string_spec.rb
260
- - spec/rspec/expectations/expectation_target_spec.rb
261
- - spec/rspec/expectations/extensions/kernel_spec.rb
262
- - spec/rspec/expectations/fail_with_spec.rb
263
- - spec/rspec/expectations/handler_spec.rb
264
- - spec/rspec/expectations/minitest_integration_spec.rb
265
- - spec/rspec/expectations/syntax_spec.rb
266
- - spec/rspec/expectations_spec.rb
267
- - spec/rspec/matchers/aliased_matcher_spec.rb
268
- - spec/rspec/matchers/aliases_spec.rb
269
- - spec/rspec/matchers/built_in/base_matcher_spec.rb
270
- - spec/rspec/matchers/built_in/be_between_spec.rb
271
- - spec/rspec/matchers/built_in/be_instance_of_spec.rb
272
- - spec/rspec/matchers/built_in/be_kind_of_spec.rb
273
- - spec/rspec/matchers/built_in/be_spec.rb
274
- - spec/rspec/matchers/built_in/be_within_spec.rb
275
- - spec/rspec/matchers/built_in/change_spec.rb
276
- - spec/rspec/matchers/built_in/compound_spec.rb
277
- - spec/rspec/matchers/built_in/contain_exactly_spec.rb
278
- - spec/rspec/matchers/built_in/cover_spec.rb
279
- - spec/rspec/matchers/built_in/eq_spec.rb
280
- - spec/rspec/matchers/built_in/eql_spec.rb
281
- - spec/rspec/matchers/built_in/equal_spec.rb
282
- - spec/rspec/matchers/built_in/exist_spec.rb
283
- - spec/rspec/matchers/built_in/has_spec.rb
284
- - spec/rspec/matchers/built_in/include_spec.rb
285
- - spec/rspec/matchers/built_in/match_spec.rb
286
- - spec/rspec/matchers/built_in/operators_spec.rb
287
- - spec/rspec/matchers/built_in/output_spec.rb
288
- - spec/rspec/matchers/built_in/raise_error_spec.rb
289
- - spec/rspec/matchers/built_in/respond_to_spec.rb
290
- - spec/rspec/matchers/built_in/satisfy_spec.rb
291
- - spec/rspec/matchers/built_in/start_and_end_with_spec.rb
292
- - spec/rspec/matchers/built_in/throw_symbol_spec.rb
293
- - spec/rspec/matchers/built_in/yield_spec.rb
294
- - spec/rspec/matchers/configuration_spec.rb
295
- - spec/rspec/matchers/description_generation_spec.rb
296
- - spec/rspec/matchers/dsl_spec.rb
297
- - spec/rspec/matchers/legacy_spec.rb
298
- - spec/rspec/matchers_spec.rb
299
- - spec/spec_helper.rb
300
- - spec/support/matchers.rb
301
- - spec/support/shared_examples.rb
302
182
  homepage: http://github.com/rspec/rspec-expectations
303
183
  licenses:
304
184
  - MIT
185
+ metadata: {}
305
186
  post_install_message:
306
187
  rdoc_options:
307
- - --charset=UTF-8
188
+ - "--charset=UTF-8"
308
189
  require_paths:
309
190
  - lib
310
191
  required_ruby_version: !ruby/object:Gem::Requirement
311
- none: false
312
192
  requirements:
313
- - - ! '>='
193
+ - - ">="
314
194
  - !ruby/object:Gem::Version
315
195
  version: 1.8.7
316
196
  required_rubygems_version: !ruby/object:Gem::Requirement
317
- none: false
318
197
  requirements:
319
- - - ! '>'
198
+ - - ">"
320
199
  - !ruby/object:Gem::Version
321
200
  version: 1.3.1
322
201
  requirements: []
323
202
  rubyforge_project: rspec
324
- rubygems_version: 1.8.23
203
+ rubygems_version: 2.2.2
325
204
  signing_key:
326
- specification_version: 3
327
- summary: rspec-expectations-3.0.0.beta2
328
- test_files:
329
- - features/README.md
330
- - features/Upgrade.md
331
- - features/built_in_matchers/README.md
332
- - features/built_in_matchers/be.feature
333
- - features/built_in_matchers/be_within.feature
334
- - features/built_in_matchers/comparisons.feature
335
- - features/built_in_matchers/contain_exactly.feature
336
- - features/built_in_matchers/cover.feature
337
- - features/built_in_matchers/end_with.feature
338
- - features/built_in_matchers/equality.feature
339
- - features/built_in_matchers/exist.feature
340
- - features/built_in_matchers/expect_change.feature
341
- - features/built_in_matchers/expect_error.feature
342
- - features/built_in_matchers/include.feature
343
- - features/built_in_matchers/match.feature
344
- - features/built_in_matchers/output.feature
345
- - features/built_in_matchers/predicates.feature
346
- - features/built_in_matchers/respond_to.feature
347
- - features/built_in_matchers/satisfy.feature
348
- - features/built_in_matchers/start_with.feature
349
- - features/built_in_matchers/throw_symbol.feature
350
- - features/built_in_matchers/types.feature
351
- - features/built_in_matchers/yield.feature
352
- - features/composing_matchers.feature
353
- - features/compound_expectations.feature
354
- - features/custom_matchers/access_running_example.feature
355
- - features/custom_matchers/define_diffable_matcher.feature
356
- - features/custom_matchers/define_matcher.feature
357
- - features/custom_matchers/define_matcher_outside_rspec.feature
358
- - features/custom_matchers/define_matcher_with_fluent_interface.feature
359
- - features/customized_message.feature
360
- - features/diffing.feature
361
- - features/implicit_docstrings.feature
362
- - features/step_definitions/additional_cli_steps.rb
363
- - features/support/env.rb
364
- - features/support/rubinius.rb
365
- - features/syntax_configuration.feature
366
- - features/test_frameworks/minitest.feature
367
- - spec/rspec/expectations/diff_presenter_spec.rb
368
- - spec/rspec/expectations/encoded_string_spec.rb
369
- - spec/rspec/expectations/expectation_target_spec.rb
370
- - spec/rspec/expectations/extensions/kernel_spec.rb
371
- - spec/rspec/expectations/fail_with_spec.rb
372
- - spec/rspec/expectations/handler_spec.rb
373
- - spec/rspec/expectations/minitest_integration_spec.rb
374
- - spec/rspec/expectations/syntax_spec.rb
375
- - spec/rspec/expectations_spec.rb
376
- - spec/rspec/matchers/aliased_matcher_spec.rb
377
- - spec/rspec/matchers/aliases_spec.rb
378
- - spec/rspec/matchers/built_in/base_matcher_spec.rb
379
- - spec/rspec/matchers/built_in/be_between_spec.rb
380
- - spec/rspec/matchers/built_in/be_instance_of_spec.rb
381
- - spec/rspec/matchers/built_in/be_kind_of_spec.rb
382
- - spec/rspec/matchers/built_in/be_spec.rb
383
- - spec/rspec/matchers/built_in/be_within_spec.rb
384
- - spec/rspec/matchers/built_in/change_spec.rb
385
- - spec/rspec/matchers/built_in/compound_spec.rb
386
- - spec/rspec/matchers/built_in/contain_exactly_spec.rb
387
- - spec/rspec/matchers/built_in/cover_spec.rb
388
- - spec/rspec/matchers/built_in/eq_spec.rb
389
- - spec/rspec/matchers/built_in/eql_spec.rb
390
- - spec/rspec/matchers/built_in/equal_spec.rb
391
- - spec/rspec/matchers/built_in/exist_spec.rb
392
- - spec/rspec/matchers/built_in/has_spec.rb
393
- - spec/rspec/matchers/built_in/include_spec.rb
394
- - spec/rspec/matchers/built_in/match_spec.rb
395
- - spec/rspec/matchers/built_in/operators_spec.rb
396
- - spec/rspec/matchers/built_in/output_spec.rb
397
- - spec/rspec/matchers/built_in/raise_error_spec.rb
398
- - spec/rspec/matchers/built_in/respond_to_spec.rb
399
- - spec/rspec/matchers/built_in/satisfy_spec.rb
400
- - spec/rspec/matchers/built_in/start_and_end_with_spec.rb
401
- - spec/rspec/matchers/built_in/throw_symbol_spec.rb
402
- - spec/rspec/matchers/built_in/yield_spec.rb
403
- - spec/rspec/matchers/configuration_spec.rb
404
- - spec/rspec/matchers/description_generation_spec.rb
405
- - spec/rspec/matchers/dsl_spec.rb
406
- - spec/rspec/matchers/legacy_spec.rb
407
- - spec/rspec/matchers_spec.rb
408
- - spec/spec_helper.rb
409
- - spec/support/matchers.rb
410
- - spec/support/shared_examples.rb
205
+ specification_version: 4
206
+ summary: rspec-expectations-3.0.0.rc1
207
+ test_files: []
411
208
  has_rdoc: