rspec 1.3.0 → 1.3.1.rc

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.
@@ -97,6 +97,11 @@ the missing elements were: [1]
97
97
  MESSAGE
98
98
  end
99
99
 
100
+ it "should work with subclasses of Array" do
101
+ class SuperArray < Array; end
102
+ SuperArray.new([1,2,3]).should =~ SuperArray.new([3,2,1])
103
+ end
104
+
100
105
  end
101
106
 
102
107
  describe "should_not =~ [:with, :multiple, :args]" do
@@ -3,6 +3,13 @@ require 'spec_helper'
3
3
  module Spec
4
4
  module Matchers
5
5
  describe SimpleMatcher do
6
+ before { Spec.stub(:deprecate) }
7
+
8
+ it "is deprecated" do
9
+ Spec.should_receive(:deprecate)
10
+ simple_matcher("foo") {}
11
+ end
12
+
6
13
  it "should pass match arg to block" do
7
14
  actual = nil
8
15
  matcher = simple_matcher("message") do |given| actual = given end
@@ -35,59 +42,59 @@ module Spec
35
42
  matcher.matches?("anything").should be_true
36
43
  end.should fail_with(/expected: 3/)
37
44
  end
38
- end
39
45
 
40
- describe "with arity of 2" do
41
- it "should provide the matcher so you can access its messages" do
42
- provided_matcher = nil
43
- matcher = simple_matcher("thing") do |given, matcher|
44
- provided_matcher = matcher
46
+ describe "with arity of 2" do
47
+ it "should provide the matcher so you can access its messages" do
48
+ provided_matcher = nil
49
+ matcher = simple_matcher("thing") do |given, matcher|
50
+ provided_matcher = matcher
51
+ end
52
+ matcher.matches?("anything")
53
+ provided_matcher.should equal(matcher)
45
54
  end
46
- matcher.matches?("anything")
47
- provided_matcher.should equal(matcher)
48
- end
49
-
50
- it "should support a custom failure message" do
51
- matcher = simple_matcher("thing") do |given, matcher|
52
- matcher.failure_message = "custom message"
55
+
56
+ it "should support a custom failure message" do
57
+ matcher = simple_matcher("thing") do |given, matcher|
58
+ matcher.failure_message = "custom message"
59
+ end
60
+ matcher.matches?("other")
61
+ matcher.failure_message.should == "custom message"
53
62
  end
54
- matcher.matches?("other")
55
- matcher.failure_message.should == "custom message"
56
- end
57
63
 
58
- it "should complain when asked for a failure message if you don't give it a description or a message" do
59
- matcher = simple_matcher do |given, matcher| end
60
- matcher.matches?("other")
61
- matcher.failure_message.should =~ /No description provided/
62
- end
64
+ it "should complain when asked for a failure message if you don't give it a description or a message" do
65
+ matcher = simple_matcher do |given, matcher| end
66
+ matcher.matches?("other")
67
+ matcher.failure_message.should =~ /No description provided/
68
+ end
63
69
 
64
- it "should support a custom negative failure message" do
65
- matcher = simple_matcher("thing") do |given, matcher|
66
- matcher.negative_failure_message = "custom message"
70
+ it "should support a custom negative failure message" do
71
+ matcher = simple_matcher("thing") do |given, matcher|
72
+ matcher.negative_failure_message = "custom message"
73
+ end
74
+ matcher.matches?("other")
75
+ matcher.negative_failure_message.should == "custom message"
76
+ end
77
+
78
+ it "should complain when asked for a negative failure message if you don't give it a description or a message" do
79
+ matcher = simple_matcher do |given, matcher| end
80
+ matcher.matches?("other")
81
+ matcher.negative_failure_message.should =~ /No description provided/
67
82
  end
68
- matcher.matches?("other")
69
- matcher.negative_failure_message.should == "custom message"
70
- end
71
-
72
- it "should complain when asked for a negative failure message if you don't give it a description or a message" do
73
- matcher = simple_matcher do |given, matcher| end
74
- matcher.matches?("other")
75
- matcher.negative_failure_message.should =~ /No description provided/
76
- end
77
83
 
78
- it "should support a custom description" do
79
- matcher = simple_matcher("thing") do |given, matcher|
80
- matcher.description = "custom message"
84
+ it "should support a custom description" do
85
+ matcher = simple_matcher("thing") do |given, matcher|
86
+ matcher.description = "custom message"
87
+ end
88
+ matcher.matches?("description")
89
+ matcher.description.should == "custom message"
81
90
  end
82
- matcher.matches?("description")
83
- matcher.description.should == "custom message"
84
- end
85
91
 
86
- it "should tell you no description was provided when it doesn't receive one" do
87
- matcher = simple_matcher do end
88
- matcher.description.should =~ /No description provided/
92
+ it "should tell you no description was provided when it doesn't receive one" do
93
+ matcher = simple_matcher do end
94
+ matcher.description.should =~ /No description provided/
95
+ end
89
96
  end
97
+
90
98
  end
91
-
92
99
  end
93
- end
100
+ end
@@ -4,7 +4,7 @@ module Spec
4
4
  module Matchers
5
5
  describe ThrowSymbol do
6
6
  describe "with no args" do
7
- let(:matcher) { ThrowSymbol.new }
7
+ let(:matcher) { throw_symbol }
8
8
 
9
9
  it "matches if any Symbol is thrown" do
10
10
  matcher.matches?(lambda{ throw :sym }).should be_true
@@ -30,7 +30,7 @@ module Spec
30
30
  end
31
31
 
32
32
  describe "with a symbol" do
33
- let(:matcher) { ThrowSymbol.new(:sym) }
33
+ let(:matcher) { throw_symbol(:sym) }
34
34
 
35
35
  it "matches if correct Symbol is thrown" do
36
36
  matcher.matches?(lambda{ throw :sym }).should be_true
@@ -75,7 +75,7 @@ module Spec
75
75
  end
76
76
 
77
77
  describe "with a symbol and an arg" do
78
- let(:matcher) { ThrowSymbol.new(:sym, "a") }
78
+ let(:matcher) { throw_symbol(:sym, "a") }
79
79
 
80
80
  it "matches if correct Symbol and args are thrown" do
81
81
  matcher.matches?(lambda{ throw :sym, "a" }).should be_true
@@ -9,10 +9,8 @@ module BugReport496
9
9
 
10
10
  describe "a message expectation on a base class object" do
11
11
  it "should correctly pick up message sent to it subclass" do
12
- pending("fix for http://rspec.lighthouseapp.com/projects/5645/tickets/496") do
13
- BaseClass.should_receive(:new).once
14
- SubClass.new
15
- end
12
+ BaseClass.should_receive(:new).once
13
+ SubClass.new
16
14
  end
17
15
  end
18
16
  end
@@ -109,4 +109,4 @@ end
109
109
 
110
110
  Spec::Runner.configure do |config|
111
111
  config.extend(Macros)
112
- end
112
+ end
metadata CHANGED
@@ -1,7 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ hash: 7712022
5
+ prerelease: true
6
+ segments:
7
+ - 1
8
+ - 3
9
+ - 1
10
+ - rc
11
+ version: 1.3.1.rc
5
12
  platform: ruby
6
13
  authors:
7
14
  - RSpec Development Team
@@ -9,69 +16,119 @@ autorequire:
9
16
  bindir: bin
10
17
  cert_chain: []
11
18
 
12
- date: 2010-01-11 00:00:00 -06:00
19
+ date: 2010-10-03 00:00:00 -05:00
13
20
  default_executable:
14
21
  dependencies:
15
22
  - !ruby/object:Gem::Dependency
16
- name: cucumber
23
+ name: rubyforge
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 7
31
+ segments:
32
+ - 2
33
+ - 0
34
+ - 4
35
+ version: 2.0.4
17
36
  type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ name: cucumber
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
20
43
  requirements:
21
44
  - - ">="
22
45
  - !ruby/object:Gem::Version
46
+ hash: 13
47
+ segments:
48
+ - 0
49
+ - 3
23
50
  version: "0.3"
24
- version:
51
+ type: :development
52
+ version_requirements: *id002
25
53
  - !ruby/object:Gem::Dependency
26
54
  name: fakefs
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
30
58
  requirements:
31
59
  - - ">="
32
60
  - !ruby/object:Gem::Version
61
+ hash: 21
62
+ segments:
63
+ - 0
64
+ - 2
65
+ - 1
33
66
  version: 0.2.1
34
- version:
67
+ type: :development
68
+ version_requirements: *id003
35
69
  - !ruby/object:Gem::Dependency
36
70
  name: syntax
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
40
74
  requirements:
41
75
  - - ">="
42
76
  - !ruby/object:Gem::Version
77
+ hash: 15
78
+ segments:
79
+ - 1
80
+ - 0
43
81
  version: "1.0"
44
- version:
82
+ type: :development
83
+ version_requirements: *id004
45
84
  - !ruby/object:Gem::Dependency
46
85
  name: diff-lcs
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
86
+ prerelease: false
87
+ requirement: &id005 !ruby/object:Gem::Requirement
88
+ none: false
50
89
  requirements:
51
90
  - - ">="
52
91
  - !ruby/object:Gem::Version
92
+ hash: 23
93
+ segments:
94
+ - 1
95
+ - 1
96
+ - 2
53
97
  version: 1.1.2
54
- version:
98
+ type: :development
99
+ version_requirements: *id005
55
100
  - !ruby/object:Gem::Dependency
56
101
  name: heckle
57
- type: :development
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
102
+ prerelease: false
103
+ requirement: &id006 !ruby/object:Gem::Requirement
104
+ none: false
60
105
  requirements:
61
106
  - - ">="
62
107
  - !ruby/object:Gem::Version
108
+ hash: 1
109
+ segments:
110
+ - 1
111
+ - 4
112
+ - 3
63
113
  version: 1.4.3
64
- version:
114
+ type: :development
115
+ version_requirements: *id006
65
116
  - !ruby/object:Gem::Dependency
66
117
  name: hoe
67
- type: :development
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
118
+ prerelease: false
119
+ requirement: &id007 !ruby/object:Gem::Requirement
120
+ none: false
70
121
  requirements:
71
122
  - - ">="
72
123
  - !ruby/object:Gem::Version
73
- version: 2.3.3
74
- version:
124
+ hash: 19
125
+ segments:
126
+ - 2
127
+ - 6
128
+ - 2
129
+ version: 2.6.2
130
+ type: :development
131
+ version_requirements: *id007
75
132
  description: Behaviour Driven Development for Ruby.
76
133
  email:
77
134
  - rspec-devel@rubyforge.org
@@ -477,7 +534,7 @@ licenses: []
477
534
  post_install_message: |
478
535
  **************************************************
479
536
 
480
- Thank you for installing rspec-1.3.0
537
+ Thank you for installing rspec-1.3.1.rc
481
538
 
482
539
  Please be sure to read History.rdoc and Upgrade.rdoc
483
540
  for useful information about this release.
@@ -490,23 +547,31 @@ rdoc_options:
490
547
  require_paths:
491
548
  - lib
492
549
  required_ruby_version: !ruby/object:Gem::Requirement
550
+ none: false
493
551
  requirements:
494
552
  - - ">="
495
553
  - !ruby/object:Gem::Version
554
+ hash: 3
555
+ segments:
556
+ - 0
496
557
  version: "0"
497
- version:
498
558
  required_rubygems_version: !ruby/object:Gem::Requirement
559
+ none: false
499
560
  requirements:
500
- - - ">="
561
+ - - ">"
501
562
  - !ruby/object:Gem::Version
502
- version: "0"
503
- version:
563
+ hash: 25
564
+ segments:
565
+ - 1
566
+ - 3
567
+ - 1
568
+ version: 1.3.1
504
569
  requirements: []
505
570
 
506
571
  rubyforge_project: rspec
507
- rubygems_version: 1.3.5
572
+ rubygems_version: 1.3.7
508
573
  signing_key:
509
574
  specification_version: 3
510
- summary: rspec 1.3.0
575
+ summary: rspec 1.3.1.rc
511
576
  test_files: []
512
577