rspec-expectations 2.7.0.rc1 → 2.7.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.
data/README.md CHANGED
@@ -1,22 +1,7 @@
1
1
  # RSpec Expectations
2
2
 
3
3
  rspec-expectations adds `should` and `should_not` to every object and includes
4
- RSpec::Matchers, a library of standard matchers.
5
-
6
- [![build status](https://secure.travis-ci.org/rspec/rspec-expectations.png)](http://travis-ci.org/rspec/rspec-expectations)
7
-
8
- ## Documentation
9
-
10
- The [Cucumber features](http://relishapp.com/rspec/rspec-expectations)
11
- are the most comprehensive and up-to-date docs for end-users.
12
-
13
- The [RDoc](http://rubydoc.info/gems/rspec-expectations/2.3.0/frames) provides
14
- additional information for contributors and/or extenders.
15
-
16
- All of the documentation is open source and a work in progress. If you find it
17
- lacking or confusing, you can help improve it by submitting requests and
18
- patches to the [rspec-expectations issue
19
- tracker](https://github.com/rspec/rspec-expectations/issues).
4
+ several standard matchers in RSpec::Matchers
20
5
 
21
6
  ## Install
22
7
 
@@ -32,10 +17,6 @@ Matchers are objects used to compose expectations:
32
17
  In that example, `eq("this value")` returns a `Matcher` object that
33
18
  compares the actual `result` to the expected `"this value"`.
34
19
 
35
- ## Contribute
36
-
37
- See [http://github.com/rspec/rspec-dev](http://github.com/rspec/rspec-dev)
38
-
39
20
  ## Also see
40
21
 
41
22
  * [http://github.com/rspec/rspec](http://github.com/rspec/rspec)
@@ -2,7 +2,7 @@ module RSpec
2
2
  module Expectations
3
3
  # @private
4
4
  module Version
5
- STRING = '2.7.0.rc1'
5
+ STRING = '2.7.0'
6
6
  end
7
7
  end
8
8
  end
@@ -1,14 +1,6 @@
1
1
  module RSpec
2
2
  module Matchers
3
- # :call-seq:
4
- # should be_close(expected, delta)
5
- # should_not be_close(expected, delta)
6
- #
7
- # Passes if actual == expected +/- delta
8
- #
9
- # == Example
10
- #
11
- # result.should be_close(3.0, 0.5)
3
+ # @deprecated use +be_within+ instead.
12
4
  def be_close(expected, delta)
13
5
  RSpec.deprecate("be_close(#{expected}, #{delta})", "be_within(#{delta}).of(#{expected})")
14
6
  be_within(delta).of(expected)
@@ -1,14 +1,11 @@
1
1
  module RSpec
2
2
  module Matchers
3
- # :call-seq:
4
- # should be_within(delta).of(expected)
5
- # should_not be_within(delta).of(expected)
6
- #
7
3
  # Passes if actual == expected +/- delta
8
4
  #
9
- # == Example
5
+ # == Examples
10
6
  #
11
7
  # result.should be_within(0.5).of(3.0)
8
+ # result.should_not be_within(0.5).of(3.0)
12
9
  def be_within(delta)
13
10
  Matcher.new :be_within, delta do |_delta_|
14
11
  chain :of do |_expected_|
@@ -1,10 +1,6 @@
1
1
  module RSpec
2
2
  module Matchers
3
- # :call-seq:
4
- # should eq(expected)
5
- # should_not eq(expected)
6
- #
7
- # Passes if actual == expected.
3
+ # Passes if <tt>actual == expected</tt>.
8
4
  #
9
5
  # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby.
10
6
  #
@@ -1,10 +1,6 @@
1
1
  module RSpec
2
2
  module Matchers
3
- # :call-seq:
4
- # should eql(expected)
5
- # should_not eql(expected)
6
- #
7
- # Passes if actual and expected are of equal value, but not necessarily the same object.
3
+ # Passes if +actual.eql?(expected)+
8
4
  #
9
5
  # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby.
10
6
  #
@@ -1,18 +1,13 @@
1
1
  module RSpec
2
2
  module Matchers
3
-
4
- # :call-seq:
5
- # should equal(expected)
6
- # should_not equal(expected)
7
- #
8
- # Passes if actual and expected are the same object (object identity).
3
+ # Passes if <tt>actual.equal?(expected)</tt> (object identity).
9
4
  #
10
5
  # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby.
11
6
  #
12
7
  # == Examples
13
8
  #
14
- # 5.should equal(5) #Fixnums are equal
15
- # "5".should_not equal("5") #Strings that look the same are not the same object
9
+ # 5.should equal(5) # Fixnums are equal
10
+ # "5".should_not equal("5") # Strings that look the same are not the same object
16
11
  def equal(expected)
17
12
  Matcher.new :equal, expected do |_expected_|
18
13
  match do |actual|
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Matchers
3
3
  class << self
4
- attr_accessor :last_matcher, :last_should # :nodoc:
4
+ attr_accessor :last_matcher, :last_should
5
5
  end
6
6
 
7
7
  def self.clear_generated_description
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Matchers
3
- class Have #:nodoc:
3
+ class Have
4
4
  def initialize(expected, relativity=:exactly)
5
5
  @expected = case expected
6
6
  when :no then 0
@@ -41,11 +41,11 @@ module RSpec
41
41
  end
42
42
  end
43
43
 
44
- def comparing_hash_keys?(actual, expected) # :nodoc:
44
+ def comparing_hash_keys?(actual, expected)
45
45
  actual.is_a?(Hash) && !expected.is_a?(Hash)
46
46
  end
47
47
 
48
- def comparing_hash_values?(actual, expected) # :nodoc:
48
+ def comparing_hash_values?(actual, expected)
49
49
  actual.is_a?(Hash) && expected.is_a?(Hash)
50
50
  end
51
51
  end
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Matchers
3
3
 
4
- class MatchArray #:nodoc:
4
+ class MatchArray
5
5
  include RSpec::Matchers::Pretty
6
6
 
7
7
  def initialize(expected)
@@ -55,7 +55,7 @@ module RSpec
55
55
  singleton_class.__send__(:include, *args)
56
56
  end
57
57
 
58
- def define_method(name, &block) # :nodoc:
58
+ def define_method(name, &block)
59
59
  singleton_class.__send__(:define_method, name, &block)
60
60
  end
61
61
 
@@ -119,7 +119,7 @@ module RSpec
119
119
  end
120
120
  end
121
121
 
122
- def making_declared_methods_public # :nodoc:
122
+ def making_declared_methods_public
123
123
  # Our home-grown instance_exec in ruby 1.8.6 results in any methods
124
124
  # declared in the block eval'd by instance_exec in the block to which we
125
125
  # are yielding here are scoped private. This is NOT the case for Ruby
@@ -3,7 +3,7 @@ module RSpec
3
3
 
4
4
  private
5
5
 
6
- def method_missing(method, *args, &block) # :nodoc:
6
+ def method_missing(method, *args, &block)
7
7
  return Matchers::BePredicate.new(method, *args, &block) if method.to_s =~ /^be_/
8
8
  return Matchers::Has.new(method, *args, &block) if method.to_s =~ /^have_/
9
9
  super
@@ -62,7 +62,7 @@ module RSpec
62
62
 
63
63
  end
64
64
 
65
- class PositiveOperatorMatcher < OperatorMatcher #:nodoc:
65
+ class PositiveOperatorMatcher < OperatorMatcher
66
66
  def __delegate_operator(actual, operator, expected)
67
67
  if actual.__send__(operator, expected)
68
68
  true
@@ -75,7 +75,7 @@ module RSpec
75
75
 
76
76
  end
77
77
 
78
- class NegativeOperatorMatcher < OperatorMatcher #:nodoc:
78
+ class NegativeOperatorMatcher < OperatorMatcher
79
79
  def __delegate_operator(actual, operator, expected)
80
80
  return false unless actual.__send__(operator, expected)
81
81
  return fail_with_message("expected not: #{operator} #{expected.inspect}\n got: #{operator.gsub(/./, ' ')} #{actual.inspect}")
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Matchers
3
- class RaiseError #:nodoc:
3
+ class RaiseError
4
4
  def initialize(expected_error_or_message=Exception, expected_message=nil, &block)
5
5
  @block = block
6
6
  @actual_error = nil
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Matchers
3
3
 
4
- class RespondTo #:nodoc:
4
+ class RespondTo
5
5
  def initialize(*names)
6
6
  @names = names
7
7
  @expected_arity = nil
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Matchers
3
3
 
4
- class Satisfy #:nodoc:
4
+ class Satisfy
5
5
  def initialize(&block)
6
6
  @block = block
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Matchers
3
3
 
4
- class ThrowSymbol #:nodoc:
4
+ class ThrowSymbol
5
5
  def initialize(expected_symbol = nil, expected_arg=nil)
6
6
  @expected_symbol = expected_symbol
7
7
  @expected_arg = expected_arg
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424039
5
- prerelease: 6
4
+ hash: 19
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 7
9
9
  - 0
10
- - rc
11
- - 1
12
- version: 2.7.0.rc1
10
+ version: 2.7.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - David Chelimsky
@@ -18,12 +16,9 @@ autorequire:
18
16
  bindir: bin
19
17
  cert_chain: []
20
18
 
21
- date: 2011-10-09 00:00:00 Z
19
+ date: 2011-10-16 00:00:00 Z
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
24
- type: :runtime
25
- prerelease: false
26
- name: diff-lcs
27
22
  version_requirements: &id001 !ruby/object:Gem::Requirement
28
23
  none: false
29
24
  requirements:
@@ -36,6 +31,9 @@ dependencies:
36
31
  - 2
37
32
  version: 1.1.2
38
33
  requirement: *id001
34
+ type: :runtime
35
+ prerelease: false
36
+ name: diff-lcs
39
37
  description: rspec expectations (should[_not] and matchers)
40
38
  email: dchelimsky@gmail.com;chad.humphries@gmail.com
41
39
  executables: []
@@ -174,21 +172,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
172
  required_rubygems_version: !ruby/object:Gem::Requirement
175
173
  none: false
176
174
  requirements:
177
- - - ">"
175
+ - - ">="
178
176
  - !ruby/object:Gem::Version
179
- hash: 25
177
+ hash: 3
180
178
  segments:
181
- - 1
182
- - 3
183
- - 1
184
- version: 1.3.1
179
+ - 0
180
+ version: "0"
185
181
  requirements: []
186
182
 
187
183
  rubyforge_project: rspec
188
- rubygems_version: 1.8.6
184
+ rubygems_version: 1.8.11
189
185
  signing_key:
190
186
  specification_version: 3
191
- summary: rspec-expectations-2.7.0.rc1
187
+ summary: rspec-expectations-2.7.0
192
188
  test_files:
193
189
  - features/README.markdown
194
190
  - features/Upgrade.md