rspec-rails 2.13.2 → 2.14.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +13 -0
- data/README.md +4 -0
- data/lib/generators/rspec/helper/templates/helper_spec.rb +1 -1
- data/lib/generators/rspec/integration/integration_generator.rb +1 -1
- data/lib/generators/rspec/scaffold/scaffold_generator.rb +1 -1
- data/lib/rspec/rails.rb +2 -2
- data/lib/rspec/rails/adapters.rb +15 -0
- data/lib/rspec/rails/example/view_example_group.rb +1 -1
- data/lib/rspec/rails/module_inclusion.rb +1 -11
- data/lib/rspec/rails/tasks/rspec.rake +4 -1
- data/lib/rspec/rails/version.rb +1 -1
- data/lib/rspec/rails/view_rendering.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04c5822ee12ba5761dfec43b208aeb0d945e70b0
|
4
|
+
data.tar.gz: 4b06190cf25cd2c4058da8c2b9ba777b3d0d7359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 604533fb3bb940d49e396d434633b07ed51e3aa28a7ec16d7c00f38a4bec2722ac123a1658df97125afa827dd05afa52dc89804314ab1ff26f324b105e4945e2
|
7
|
+
data.tar.gz: 8c4648637f18a46590249f07de896212d4fb08a0913dcd31d48ddbfe543d1cc3f8940543f901c8db9d8c64917ce091ca0fcb9916fa0cd4a014addd2d0ac12113
|
data/Changelog.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 2.14.0.rc1 / 2013-05-27
|
2
|
+
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.13.2...v2.14.0.rc1)
|
3
|
+
|
4
|
+
Enhancements
|
5
|
+
|
6
|
+
* Prelimiarily support Rails 4.1 by updating adapters to support Minitest 5.0.
|
7
|
+
(Andy Lindeman)
|
8
|
+
|
9
|
+
Bug fixes
|
10
|
+
|
11
|
+
* `rake stats` runs correctly when spec files exist at the top level of the
|
12
|
+
spec/ directory. (Benjamin Fleischer)
|
13
|
+
|
1
14
|
### 2.13.2 / 2013-05-18
|
2
15
|
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.13.1...v2.13.2)
|
3
16
|
|
data/README.md
CHANGED
@@ -56,6 +56,10 @@ Once installed, RSpec will generate spec files instead of Test::Unit test files
|
|
56
56
|
when commands like `rails generate model` and `rails generate controller` are
|
57
57
|
used.
|
58
58
|
|
59
|
+
You may also invoke invoke RSpec generators independently. For instance,
|
60
|
+
running `rspec generate rspec:model` will generate a model spec. For more
|
61
|
+
information, see [list of all
|
62
|
+
generators](https://www.relishapp.com/rspec/rspec-rails/docs/generators).
|
59
63
|
|
60
64
|
## Model Specs
|
61
65
|
|
@@ -6,7 +6,7 @@ require 'spec_helper'
|
|
6
6
|
# describe <%= class_name %>Helper do
|
7
7
|
# describe "string concat" do
|
8
8
|
# it "concats two strings with spaces" do
|
9
|
-
# helper.concat_strings("this","that").
|
9
|
+
# expect(helper.concat_strings("this","that")).to eq("this that")
|
10
10
|
# end
|
11
11
|
# end
|
12
12
|
# end
|
@@ -18,7 +18,7 @@ module Rspec
|
|
18
18
|
|
19
19
|
# @deprecated Use `--webrat` instead.
|
20
20
|
def webrat?
|
21
|
-
RSpec.deprecate("the --webrat-matchers option", "--webrat") if options[:webrat_matchers]
|
21
|
+
RSpec.deprecate("the --webrat-matchers option", :replacement => "--webrat") if options[:webrat_matchers]
|
22
22
|
options[:webrat] || options[:webrat_matchers]
|
23
23
|
end
|
24
24
|
|
@@ -48,7 +48,7 @@ module Rspec
|
|
48
48
|
|
49
49
|
# @deprecated Use `--webrat` instead.
|
50
50
|
def webrat?
|
51
|
-
RSpec.deprecate("--webrat-matchers", "--webrat") if options[:webrat_matchers]
|
51
|
+
RSpec.deprecate("--webrat-matchers", :replacement => "--webrat") if options[:webrat_matchers]
|
52
52
|
options[:webrat] || options[:webrat_matchers]
|
53
53
|
end
|
54
54
|
|
data/lib/rspec/rails.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'rspec/core'
|
2
2
|
|
3
3
|
RSpec::configure do |c|
|
4
|
-
c.
|
5
|
-
c.
|
4
|
+
c.backtrace_exclusion_patterns << /vendor\//
|
5
|
+
c.backtrace_exclusion_patterns << /lib\/rspec\/rails/
|
6
6
|
end
|
7
7
|
|
8
8
|
require 'rails/version'
|
data/lib/rspec/rails/adapters.rb
CHANGED
@@ -9,6 +9,7 @@ module RSpec
|
|
9
9
|
def initialize(*assertion_modules)
|
10
10
|
assertion_class = Class.new(SimpleDelegator) do
|
11
11
|
include Test::Unit::Assertions
|
12
|
+
include ::RSpec::Rails::MinitestCounters
|
12
13
|
assertion_modules.each { |mod| include mod }
|
13
14
|
end
|
14
15
|
|
@@ -65,6 +66,19 @@ module RSpec
|
|
65
66
|
end
|
66
67
|
end
|
67
68
|
|
69
|
+
# @api private
|
70
|
+
module MinitestCounters
|
71
|
+
# @api private
|
72
|
+
def assertions
|
73
|
+
@assertions ||= 0
|
74
|
+
end
|
75
|
+
|
76
|
+
# @api private
|
77
|
+
def assertions=(assertions)
|
78
|
+
@assertions = assertions
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
68
82
|
module SetupAndTeardownAdapter
|
69
83
|
extend ActiveSupport::Concern
|
70
84
|
|
@@ -126,6 +140,7 @@ module RSpec
|
|
126
140
|
|
127
141
|
class AssertionDelegator
|
128
142
|
include Test::Unit::Assertions
|
143
|
+
include ::RSpec::Rails::MinitestCounters
|
129
144
|
end
|
130
145
|
|
131
146
|
# @api private
|
@@ -8,18 +8,8 @@ module RSpec::Rails
|
|
8
8
|
# internally. As it happens, there are a few blog posts citing its use, so
|
9
9
|
# I'm leaving it here, but deprecated.
|
10
10
|
def include_self_when_dir_matches(*path_parts)
|
11
|
-
instead = <<-INSTEAD
|
12
|
-
|
13
|
-
|
14
|
-
RSpec.configure do |c|
|
15
|
-
c.include self, :example_group => {
|
16
|
-
:file_path => /#{path_parts.join('\/')}/
|
17
|
-
}
|
18
|
-
end
|
19
|
-
|
20
|
-
INSTEAD
|
21
11
|
lambda do |c|
|
22
|
-
RSpec.deprecate('include_self_when_dir_matches'
|
12
|
+
RSpec.deprecate('include_self_when_dir_matches')
|
23
13
|
c.include self, :example_group => {
|
24
14
|
:file_path => Regexp.compile(path_parts.join('[\\\/]'))
|
25
15
|
}
|
@@ -14,7 +14,10 @@ RSpec::Core::RakeTask.new(:spec => spec_prereq)
|
|
14
14
|
|
15
15
|
namespace :spec do
|
16
16
|
def types
|
17
|
-
dirs = Dir['./spec/**/*_spec.rb'].
|
17
|
+
dirs = Dir['./spec/**/*_spec.rb'].
|
18
|
+
map { |f| f.sub(/^\.\/(spec\/\w+)\/.*/, '\\1') }.
|
19
|
+
uniq.
|
20
|
+
select { |f| File.directory?(f) }
|
18
21
|
Hash[dirs.map { |d| [d.split('/').last, d] }]
|
19
22
|
end
|
20
23
|
|
data/lib/rspec/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -56,44 +56,44 @@ dependencies:
|
|
56
56
|
name: rspec-core
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.14.0.rc1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: 2.14.0.rc1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec-expectations
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2.
|
75
|
+
version: 2.14.0.rc1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.
|
82
|
+
version: 2.14.0.rc1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec-mocks
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 2.
|
89
|
+
version: 2.14.0.rc1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 2.
|
96
|
+
version: 2.14.0.rc1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,14 +269,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
269
269
|
version: '0'
|
270
270
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
271
|
requirements:
|
272
|
-
- - '
|
272
|
+
- - '>'
|
273
273
|
- !ruby/object:Gem::Version
|
274
|
-
version:
|
274
|
+
version: 1.3.1
|
275
275
|
requirements: []
|
276
276
|
rubyforge_project: rspec
|
277
277
|
rubygems_version: 2.0.3
|
278
278
|
signing_key:
|
279
279
|
specification_version: 4
|
280
|
-
summary: rspec-rails-2.
|
280
|
+
summary: rspec-rails-2.14.0.rc1
|
281
281
|
test_files: []
|
282
282
|
has_rdoc:
|