rspec-rails 2.3.0 → 2.3.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.
- data/.rspec +0 -0
- data/History.md +8 -0
- data/features/.nav +26 -0
- data/lib/generators/rspec/install/install_generator.rb +0 -8
- data/lib/rspec/rails/mocks.rb +2 -2
- data/lib/rspec/rails/version.rb +1 -1
- data/spec/rspec/rails/mocks/mock_model_spec.rb +7 -0
- metadata +14 -17
data/.rspec
ADDED
File without changes
|
data/History.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## rspec-rails-2 release history
|
2
2
|
|
3
|
+
### 2.3.1 / 2010-12-16
|
4
|
+
|
5
|
+
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.3.0...master)
|
6
|
+
|
7
|
+
* Bug fixes
|
8
|
+
* respond_to? correctly handles 2 args
|
9
|
+
* scaffold generator no longer fails on autotest directory
|
10
|
+
|
3
11
|
### 2.3.0 / 2010-12-12
|
4
12
|
|
5
13
|
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.2.1...v2.3.0)
|
data/features/.nav
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
- model_specs:
|
2
|
+
- transactional_examples.feature
|
3
|
+
- errors_on.feature
|
4
|
+
- view_specs:
|
5
|
+
- view_spec.feature
|
6
|
+
- stub_template.feature
|
7
|
+
- inferred_controller_path.feature
|
8
|
+
- controller_specs:
|
9
|
+
- controller_spec.feature
|
10
|
+
- isolation_from_views.feature
|
11
|
+
- render_views.feature
|
12
|
+
- anonymous_controller.feature
|
13
|
+
- helper_specs:
|
14
|
+
- helper_spec.feature
|
15
|
+
- mailer_specs:
|
16
|
+
- url_helpers.feature
|
17
|
+
- routing_specs:
|
18
|
+
- access_to_named_routes.feature
|
19
|
+
- matchers:
|
20
|
+
- new_record_matcher.feature
|
21
|
+
- render_template_matcher.feature
|
22
|
+
- redirect_to_matcher.feature
|
23
|
+
- be_routable_matcher.feature
|
24
|
+
- mocks:
|
25
|
+
- mock_model.feature
|
26
|
+
- stub_model.feature
|
data/lib/rspec/rails/mocks.rb
CHANGED
@@ -16,7 +16,7 @@ module RSpec
|
|
16
16
|
true
|
17
17
|
end
|
18
18
|
|
19
|
-
def respond_to?(message)
|
19
|
+
def respond_to?(message, include_private=false)
|
20
20
|
message.to_s =~ /_before_type_cast$/ ? false : super
|
21
21
|
end
|
22
22
|
end
|
@@ -100,7 +100,7 @@ EOM
|
|
100
100
|
def @object.instance_of?(other)
|
101
101
|
other == #{model_class}
|
102
102
|
end
|
103
|
-
def @object.respond_to?(method_name)
|
103
|
+
def @object.respond_to?(method_name, include_private=false)
|
104
104
|
#{model_class}.respond_to?(:column_names) && #{model_class}.column_names.include?(method_name.to_s) || super
|
105
105
|
end
|
106
106
|
def @object.class
|
data/lib/rspec/rails/version.rb
CHANGED
@@ -144,6 +144,13 @@ describe "mock_model(RealModel)" do
|
|
144
144
|
MockableModel.stub(:column_names).and_return(["column_a", "column_b"])
|
145
145
|
@model = mock_model(MockableModel)
|
146
146
|
end
|
147
|
+
|
148
|
+
it "accepts two arguments" do
|
149
|
+
expect do
|
150
|
+
@model.respond_to?("title_before_type_cast", false)
|
151
|
+
end.to_not raise_exception
|
152
|
+
end
|
153
|
+
|
147
154
|
context "without as_null_object" do
|
148
155
|
it "says it will respond_to?(key) if RealModel has the attribute 'key'" do
|
149
156
|
@model.respond_to?("column_a").should be(true)
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 3
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 2
|
8
7
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
8
|
+
- 1
|
9
|
+
version: 2.3.1
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- David Chelimsky
|
@@ -15,68 +14,64 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-16 00:00:00 -06:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
21
|
+
name: activesupport
|
22
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
23
|
none: false
|
24
24
|
requirements:
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
hash: 7
|
28
27
|
segments:
|
29
28
|
- 3
|
30
29
|
- 0
|
31
30
|
version: "3.0"
|
32
31
|
type: :runtime
|
33
|
-
name: activesupport
|
34
32
|
prerelease: false
|
35
33
|
version_requirements: *id001
|
36
34
|
- !ruby/object:Gem::Dependency
|
35
|
+
name: actionpack
|
37
36
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
37
|
none: false
|
39
38
|
requirements:
|
40
39
|
- - ~>
|
41
40
|
- !ruby/object:Gem::Version
|
42
|
-
hash: 7
|
43
41
|
segments:
|
44
42
|
- 3
|
45
43
|
- 0
|
46
44
|
version: "3.0"
|
47
45
|
type: :runtime
|
48
|
-
name: actionpack
|
49
46
|
prerelease: false
|
50
47
|
version_requirements: *id002
|
51
48
|
- !ruby/object:Gem::Dependency
|
49
|
+
name: railties
|
52
50
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
51
|
none: false
|
54
52
|
requirements:
|
55
53
|
- - ~>
|
56
54
|
- !ruby/object:Gem::Version
|
57
|
-
hash: 7
|
58
55
|
segments:
|
59
56
|
- 3
|
60
57
|
- 0
|
61
58
|
version: "3.0"
|
62
59
|
type: :runtime
|
63
|
-
name: railties
|
64
60
|
prerelease: false
|
65
61
|
version_requirements: *id003
|
66
62
|
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
67
64
|
requirement: &id004 !ruby/object:Gem::Requirement
|
68
65
|
none: false
|
69
66
|
requirements:
|
70
67
|
- - ~>
|
71
68
|
- !ruby/object:Gem::Version
|
72
|
-
hash: 3
|
73
69
|
segments:
|
74
70
|
- 2
|
75
71
|
- 3
|
76
72
|
- 0
|
77
73
|
version: 2.3.0
|
78
74
|
type: :runtime
|
79
|
-
name: rspec
|
80
75
|
prerelease: false
|
81
76
|
version_requirements: *id004
|
82
77
|
description: RSpec-2 for Rails-3
|
@@ -90,6 +85,7 @@ extra_rdoc_files:
|
|
90
85
|
files:
|
91
86
|
- .document
|
92
87
|
- .gitignore
|
88
|
+
- .rspec
|
93
89
|
- Gemfile
|
94
90
|
- History.md
|
95
91
|
- License.txt
|
@@ -98,6 +94,7 @@ files:
|
|
98
94
|
- Thorfile
|
99
95
|
- Upgrade.markdown
|
100
96
|
- cucumber.yml
|
97
|
+
- features/.nav
|
101
98
|
- features/README.markdown
|
102
99
|
- features/controller_specs/README.md
|
103
100
|
- features/controller_specs/anonymous_controller.feature
|
@@ -217,7 +214,7 @@ licenses: []
|
|
217
214
|
post_install_message: |
|
218
215
|
**************************************************
|
219
216
|
|
220
|
-
Thank you for installing rspec-rails-2.3.
|
217
|
+
Thank you for installing rspec-rails-2.3.1!
|
221
218
|
|
222
219
|
This version of rspec-rails only works with versions of rails >= 3.0.0
|
223
220
|
|
@@ -227,7 +224,7 @@ post_install_message: |
|
|
227
224
|
can access its generators and rake tasks.
|
228
225
|
|
229
226
|
group :development, :test do
|
230
|
-
gem "rspec-rails", ">= 2.3.
|
227
|
+
gem "rspec-rails", ">= 2.3.1"
|
231
228
|
end
|
232
229
|
|
233
230
|
Be sure to run the following command in each of your Rails apps if you're
|
@@ -258,7 +255,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
255
|
requirements:
|
259
256
|
- - ">="
|
260
257
|
- !ruby/object:Gem::Version
|
261
|
-
hash:
|
258
|
+
hash: 2199888535887961048
|
262
259
|
segments:
|
263
260
|
- 0
|
264
261
|
version: "0"
|
@@ -267,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
264
|
requirements:
|
268
265
|
- - ">="
|
269
266
|
- !ruby/object:Gem::Version
|
270
|
-
hash:
|
267
|
+
hash: 2199888535887961048
|
271
268
|
segments:
|
272
269
|
- 0
|
273
270
|
version: "0"
|
@@ -277,7 +274,7 @@ rubyforge_project: rspec
|
|
277
274
|
rubygems_version: 1.3.7
|
278
275
|
signing_key:
|
279
276
|
specification_version: 3
|
280
|
-
summary: rspec-rails-2.3.
|
277
|
+
summary: rspec-rails-2.3.1
|
281
278
|
test_files:
|
282
279
|
- features/README.markdown
|
283
280
|
- features/controller_specs/README.md
|