rspec-rails 3.8.2 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Capybara.md +5 -54
- data/Changelog.md +440 -76
- data/README.md +281 -500
- data/lib/generators/rspec/channel/channel_generator.rb +12 -0
- data/lib/generators/rspec/{observer/templates/observer_spec.rb → channel/templates/channel_spec.rb.erb} +1 -1
- data/lib/generators/rspec/controller/controller_generator.rb +24 -7
- data/lib/generators/rspec/controller/templates/request_spec.rb +19 -0
- data/lib/generators/rspec/controller/templates/routing_spec.rb +13 -0
- data/lib/generators/rspec/feature/feature_generator.rb +3 -3
- data/lib/generators/rspec/generator/generator_generator.rb +24 -0
- data/lib/generators/rspec/generator/templates/generator_spec.rb +5 -0
- data/lib/generators/rspec/helper/helper_generator.rb +2 -2
- data/lib/generators/rspec/install/install_generator.rb +23 -6
- data/lib/generators/rspec/install/templates/spec/rails_helper.rb +32 -17
- data/lib/generators/rspec/job/job_generator.rb +2 -1
- data/lib/generators/rspec/job/templates/job_spec.rb.erb +1 -1
- data/lib/generators/rspec/mailbox/mailbox_generator.rb +14 -0
- data/lib/generators/rspec/mailbox/templates/mailbox_spec.rb.erb +7 -0
- data/lib/generators/rspec/mailer/mailer_generator.rb +7 -4
- data/lib/generators/rspec/mailer/templates/mailer_spec.rb +2 -2
- data/lib/generators/rspec/mailer/templates/preview.rb +4 -4
- data/lib/generators/rspec/model/model_generator.rb +8 -7
- data/lib/generators/rspec/model/templates/fixtures.yml +1 -1
- data/lib/generators/rspec/request/request_generator.rb +10 -3
- data/lib/generators/rspec/scaffold/scaffold_generator.rb +36 -22
- data/lib/generators/rspec/scaffold/templates/api_controller_spec.rb +13 -49
- data/lib/generators/rspec/scaffold/templates/api_request_spec.rb +131 -0
- data/lib/generators/rspec/scaffold/templates/controller_spec.rb +14 -62
- data/lib/generators/rspec/scaffold/templates/edit_spec.rb +9 -9
- data/lib/generators/rspec/scaffold/templates/index_spec.rb +3 -2
- data/lib/generators/rspec/scaffold/templates/new_spec.rb +2 -6
- data/lib/generators/rspec/scaffold/templates/request_spec.rb +138 -0
- data/lib/generators/rspec/scaffold/templates/routing_spec.rb +8 -10
- data/lib/generators/rspec/scaffold/templates/show_spec.rb +2 -2
- data/lib/generators/rspec/system/system_generator.rb +24 -0
- data/lib/generators/rspec/system/templates/system_spec.rb +9 -0
- data/lib/generators/rspec/view/view_generator.rb +4 -4
- data/lib/generators/rspec.rb +16 -5
- data/lib/rspec/rails/adapters.rb +22 -76
- data/lib/rspec/rails/configuration.rb +112 -38
- data/lib/rspec/rails/example/channel_example_group.rb +93 -0
- data/lib/rspec/rails/example/controller_example_group.rb +5 -4
- data/lib/rspec/rails/example/feature_example_group.rb +6 -26
- data/lib/rspec/rails/example/helper_example_group.rb +2 -9
- data/lib/rspec/rails/example/mailbox_example_group.rb +80 -0
- data/lib/rspec/rails/example/mailer_example_group.rb +2 -2
- data/lib/rspec/rails/example/rails_example_group.rb +7 -1
- data/lib/rspec/rails/example/request_example_group.rb +1 -4
- data/lib/rspec/rails/example/routing_example_group.rb +0 -2
- data/lib/rspec/rails/example/system_example_group.rb +88 -16
- data/lib/rspec/rails/example/view_example_group.rb +40 -28
- data/lib/rspec/rails/example.rb +2 -0
- data/lib/rspec/rails/extensions/active_record/proxy.rb +5 -10
- data/lib/rspec/rails/feature_check.rb +16 -29
- data/lib/rspec/rails/file_fixture_support.rb +11 -10
- data/lib/rspec/rails/fixture_file_upload_support.rb +20 -15
- data/lib/rspec/rails/fixture_support.rb +64 -34
- data/lib/rspec/rails/matchers/action_cable/have_broadcasted_to.rb +173 -0
- data/lib/rspec/rails/matchers/action_cable/have_streams.rb +58 -0
- data/lib/rspec/rails/matchers/action_cable.rb +65 -0
- data/lib/rspec/rails/matchers/action_mailbox.rb +73 -0
- data/lib/rspec/rails/matchers/active_job.rb +224 -24
- data/lib/rspec/rails/matchers/base_matcher.rb +179 -0
- data/lib/rspec/rails/matchers/be_a_new.rb +1 -1
- data/lib/rspec/rails/matchers/be_new_record.rb +1 -1
- data/lib/rspec/rails/matchers/be_valid.rb +1 -1
- data/lib/rspec/rails/matchers/have_enqueued_mail.rb +258 -0
- data/lib/rspec/rails/matchers/have_http_status.rb +23 -32
- data/lib/rspec/rails/matchers/have_rendered.rb +2 -1
- data/lib/rspec/rails/matchers/redirect_to.rb +1 -1
- data/lib/rspec/rails/matchers/relation_match_array.rb +1 -1
- data/lib/rspec/rails/matchers/routing_matchers.rb +13 -13
- data/lib/rspec/rails/matchers/send_email.rb +122 -0
- data/lib/rspec/rails/matchers.rb +12 -0
- data/lib/rspec/rails/tasks/rspec.rake +9 -17
- data/lib/rspec/rails/vendor/capybara.rb +10 -17
- data/lib/rspec/rails/version.rb +1 -1
- data/lib/rspec/rails/view_assigns.rb +0 -18
- data/lib/rspec/rails/view_path_builder.rb +1 -1
- data/lib/rspec/rails/view_rendering.rb +20 -7
- data/lib/rspec-rails.rb +36 -18
- data.tar.gz.sig +0 -0
- metadata +55 -37
- metadata.gz.sig +0 -0
- data/lib/generators/rspec/integration/integration_generator.rb +0 -22
- data/lib/generators/rspec/observer/observer_generator.rb +0 -13
- /data/lib/generators/rspec/{integration → request}/templates/request_spec.rb +0 -0
@@ -3,19 +3,21 @@ if default = Rake.application.instance_variable_get('@tasks')['default']
|
|
3
3
|
default.prerequisites.delete('test')
|
4
4
|
end
|
5
5
|
|
6
|
-
task :
|
6
|
+
task default: :spec
|
7
7
|
|
8
|
-
|
8
|
+
if ::Rails::VERSION::STRING < "8.0.0"
|
9
|
+
task stats: "spec:statsetup"
|
10
|
+
end
|
9
11
|
|
10
12
|
desc "Run all specs in spec directory (excluding plugin specs)"
|
11
|
-
RSpec::Core::RakeTask.new(:
|
13
|
+
RSpec::Core::RakeTask.new(spec: "spec:prepare")
|
12
14
|
|
13
15
|
namespace :spec do
|
14
16
|
types = begin
|
15
|
-
dirs = Dir['./spec/**/*_spec.rb']
|
16
|
-
map { |f| f.sub(/^\.\/(spec\/\w+)\/.*/, '\\1') }
|
17
|
-
uniq
|
18
|
-
select { |f| File.directory?(f) }
|
17
|
+
dirs = Dir['./spec/**/*_spec.rb']
|
18
|
+
.map { |f| f.sub(/^\.\/(spec\/\w+)\/.*/, '\\1') }
|
19
|
+
.uniq
|
20
|
+
.select { |f| File.directory?(f) }
|
19
21
|
Hash[dirs.map { |d| [d.split('/').last, d] }]
|
20
22
|
end
|
21
23
|
|
@@ -35,16 +37,6 @@ namespace :spec do
|
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
|
-
# RCov task only enabled for Ruby 1.8
|
39
|
-
if RUBY_VERSION < '1.9'
|
40
|
-
desc "Run all specs with rcov"
|
41
|
-
RSpec::Core::RakeTask.new(:rcov => "spec:prepare") do |t|
|
42
|
-
t.rcov = true
|
43
|
-
t.pattern = "./spec/**/*_spec.rb"
|
44
|
-
t.rcov_opts = '--exclude /gems/,/Library/,/usr/,lib/tasks,.bundle,config,/lib/rspec/,/lib/rspec-,spec'
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
40
|
task :statsetup do
|
49
41
|
require 'rails/code_statistics'
|
50
42
|
types.each do |type, dir|
|
@@ -9,31 +9,24 @@ rescue LoadError
|
|
9
9
|
end
|
10
10
|
|
11
11
|
if defined?(Capybara)
|
12
|
-
require 'rspec/support/comparable_version'
|
13
|
-
unless RSpec::Support::ComparableVersion.new(Capybara::VERSION) >= '2.2.0'
|
14
|
-
raise "You are using capybara #{Capybara::VERSION}. RSpec requires >= 2.2.0."
|
15
|
-
end
|
16
|
-
|
17
12
|
RSpec.configure do |c|
|
18
13
|
if defined?(Capybara::DSL)
|
19
|
-
c.include Capybara::DSL, :
|
20
|
-
|
21
|
-
c.include Capybara::DSL, :type => :system
|
22
|
-
end
|
14
|
+
c.include Capybara::DSL, type: :feature
|
15
|
+
c.include Capybara::DSL, type: :system
|
23
16
|
end
|
24
17
|
|
25
18
|
if defined?(Capybara::RSpecMatchers)
|
26
|
-
c.include Capybara::RSpecMatchers, :
|
27
|
-
c.include Capybara::RSpecMatchers, :
|
28
|
-
c.include Capybara::RSpecMatchers, :
|
29
|
-
c.include Capybara::RSpecMatchers, :
|
30
|
-
c.include Capybara::RSpecMatchers, :
|
31
|
-
c.include Capybara::RSpecMatchers, :
|
19
|
+
c.include Capybara::RSpecMatchers, type: :view
|
20
|
+
c.include Capybara::RSpecMatchers, type: :helper
|
21
|
+
c.include Capybara::RSpecMatchers, type: :mailer
|
22
|
+
c.include Capybara::RSpecMatchers, type: :controller
|
23
|
+
c.include Capybara::RSpecMatchers, type: :feature
|
24
|
+
c.include Capybara::RSpecMatchers, type: :system
|
32
25
|
end
|
33
26
|
|
34
27
|
unless defined?(Capybara::RSpecMatchers) || defined?(Capybara::DSL)
|
35
|
-
c.include Capybara, :
|
36
|
-
c.include Capybara, :
|
28
|
+
c.include Capybara, type: :request
|
29
|
+
c.include Capybara, type: :controller
|
37
30
|
end
|
38
31
|
end
|
39
32
|
end
|
data/lib/rspec/rails/version.rb
CHANGED
@@ -13,26 +13,8 @@ module RSpec
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# Compat-shim for AbstractController::Rendering#view_assigns
|
16
|
-
#
|
17
|
-
# _assigns was deprecated in favor of view_assigns after
|
18
|
-
# Rails-3.0.0 was released. Since we are not able to predict when
|
19
|
-
# the _assigns/view_assigns patch will be released (I thought it
|
20
|
-
# would have been in 3.0.1, but 3.0.1 bypassed this change for a
|
21
|
-
# security fix), this bit ensures that we do the right thing without
|
22
|
-
# knowing anything about the Rails version we are dealing with.
|
23
|
-
#
|
24
|
-
# Once that change _is_ released, this can be changed to something
|
25
|
-
# that checks for the Rails version when the module is being
|
26
|
-
# interpreted, as it was before commit dd0095.
|
27
16
|
def view_assigns
|
28
17
|
super.merge(_encapsulated_assigns)
|
29
|
-
rescue
|
30
|
-
_assigns
|
31
|
-
end
|
32
|
-
|
33
|
-
# @private
|
34
|
-
def _assigns
|
35
|
-
super.merge(_encapsulated_assigns)
|
36
18
|
end
|
37
19
|
|
38
20
|
private
|
@@ -20,7 +20,7 @@ module RSpec
|
|
20
20
|
# view_path_builder.path_for({ :controller => 'posts', :action => 'delete' })
|
21
21
|
# # => ActionController::UrlGenerationError: No route matches {:action=>"delete", :controller=>"posts"}
|
22
22
|
def path_for(path_params)
|
23
|
-
url_for(path_params.merge(:
|
23
|
+
url_for(path_params.merge(only_path: true))
|
24
24
|
rescue => e
|
25
25
|
e.message
|
26
26
|
end
|
@@ -55,18 +55,31 @@ module RSpec
|
|
55
55
|
"",
|
56
56
|
template.identifier,
|
57
57
|
EmptyTemplateHandler,
|
58
|
-
:
|
59
|
-
:
|
58
|
+
virtual_path: template.virtual_path,
|
59
|
+
format: template_format(template),
|
60
|
+
locals: []
|
60
61
|
)
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
65
|
+
def self.template_format(template)
|
66
|
+
template.format
|
67
|
+
end
|
68
|
+
|
64
69
|
# Delegates all methods to the submitted resolver and for all methods
|
65
70
|
# that return a collection of `ActionView::Template` instances, return
|
66
71
|
# templates with modified source
|
67
72
|
#
|
68
73
|
# @private
|
69
|
-
class ResolverDecorator
|
74
|
+
class ResolverDecorator < ::ActionView::Resolver
|
75
|
+
(::ActionView::Resolver.instance_methods - Object.instance_methods).each do |method|
|
76
|
+
undef_method method
|
77
|
+
end
|
78
|
+
|
79
|
+
(::ActionView::Resolver.methods - Object.methods).each do |method|
|
80
|
+
singleton_class.undef_method method
|
81
|
+
end
|
82
|
+
|
70
83
|
def initialize(resolver)
|
71
84
|
@resolver = resolver
|
72
85
|
end
|
@@ -91,7 +104,7 @@ module RSpec
|
|
91
104
|
#
|
92
105
|
# @private
|
93
106
|
class FileSystemResolver < ::ActionView::FileSystemResolver
|
94
|
-
|
107
|
+
private
|
95
108
|
|
96
109
|
def find_templates(*args)
|
97
110
|
templates = super
|
@@ -102,7 +115,7 @@ module RSpec
|
|
102
115
|
|
103
116
|
# @private
|
104
117
|
class EmptyTemplateHandler
|
105
|
-
def self.call(_template)
|
118
|
+
def self.call(_template, _source = nil)
|
106
119
|
::Rails.logger.info(" Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.")
|
107
120
|
|
108
121
|
%("")
|
@@ -114,11 +127,11 @@ module RSpec
|
|
114
127
|
# @private
|
115
128
|
module EmptyTemplates
|
116
129
|
def prepend_view_path(new_path)
|
117
|
-
|
130
|
+
super(_path_decorator(*new_path))
|
118
131
|
end
|
119
132
|
|
120
133
|
def append_view_path(new_path)
|
121
|
-
|
134
|
+
super(_path_decorator(*new_path))
|
122
135
|
end
|
123
136
|
|
124
137
|
private
|
data/lib/rspec-rails.rb
CHANGED
@@ -7,16 +7,26 @@ module RSpec
|
|
7
7
|
# Railtie to hook into Rails.
|
8
8
|
class Railtie < ::Rails::Railtie
|
9
9
|
# As of Rails 5.1.0 you can register directories to work with `rake notes`
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
require 'rails/source_annotation_extractor'
|
11
|
+
::Rails::SourceAnnotationExtractor::Annotation.register_directories("spec")
|
12
|
+
|
13
|
+
# As of Rails 8.0.0 you can register directories to work with `rails stats`
|
14
|
+
if ::Rails::VERSION::STRING >= "8.0.0"
|
15
|
+
require 'rails/code_statistics'
|
16
|
+
|
17
|
+
dirs = Dir['./spec/**/*_spec.rb']
|
18
|
+
.map { |f| f.sub(/^\.\/(spec\/\w+)\/.*/, '\\1') }
|
19
|
+
.uniq
|
20
|
+
.select { |f| File.directory?(f) }
|
21
|
+
|
22
|
+
Hash[dirs.map { |d| [d.split('/').last, d] }].each do |type, dir|
|
23
|
+
name = type.singularize.capitalize
|
24
|
+
|
25
|
+
::Rails::CodeStatistics.register_directory "#{name} specs", dir, test_directory: true
|
16
26
|
end
|
17
27
|
end
|
18
|
-
|
19
|
-
generators = config.
|
28
|
+
|
29
|
+
generators = config.app_generators
|
20
30
|
generators.integration_tool :rspec
|
21
31
|
generators.test_framework :rspec
|
22
32
|
|
@@ -31,14 +41,15 @@ module RSpec
|
|
31
41
|
# This is called after the environment has been loaded but before Rails
|
32
42
|
# sets the default for the `preview_path`
|
33
43
|
initializer "rspec_rails.action_mailer",
|
34
|
-
:
|
35
|
-
|
36
|
-
|
44
|
+
before: "action_mailer.set_configs" do |app|
|
45
|
+
setup_preview_path(app)
|
46
|
+
end
|
37
47
|
|
38
48
|
private
|
39
49
|
|
40
50
|
def setup_preview_path(app)
|
41
51
|
return unless supports_action_mailer_previews?(app.config)
|
52
|
+
|
42
53
|
options = app.config.action_mailer
|
43
54
|
config_default_preview_path(options) if config_preview_path?(options)
|
44
55
|
end
|
@@ -46,18 +57,25 @@ module RSpec
|
|
46
57
|
def config_preview_path?(options)
|
47
58
|
# We cannot use `respond_to?(:show_previews)` here as it will always
|
48
59
|
# return `true`.
|
49
|
-
if
|
50
|
-
::Rails.env.development?
|
51
|
-
elsif options.show_previews.nil?
|
60
|
+
if options.show_previews.nil?
|
52
61
|
options.show_previews = ::Rails.env.development?
|
53
62
|
else
|
54
63
|
options.show_previews
|
55
64
|
end
|
56
65
|
end
|
57
66
|
|
58
|
-
|
59
|
-
|
60
|
-
|
67
|
+
if ::Rails::VERSION::STRING >= "7.1.0"
|
68
|
+
def config_default_preview_path(options)
|
69
|
+
return unless options.preview_paths.empty?
|
70
|
+
|
71
|
+
options.preview_paths << "#{::Rails.root}/spec/mailers/previews"
|
72
|
+
end
|
73
|
+
else
|
74
|
+
def config_default_preview_path(options)
|
75
|
+
return unless options.preview_path.blank?
|
76
|
+
|
77
|
+
options.preview_path = "#{::Rails.root}/spec/mailers/previews"
|
78
|
+
end
|
61
79
|
end
|
62
80
|
|
63
81
|
def supports_action_mailer_previews?(config)
|
@@ -72,7 +90,7 @@ module RSpec
|
|
72
90
|
# not respond to the method. However, we cannot use
|
73
91
|
# `config.action_mailer.respond_to?(:preview_path)` here as it will
|
74
92
|
# always return `true`.
|
75
|
-
config.respond_to?(:action_mailer)
|
93
|
+
config.respond_to?(:action_mailer)
|
76
94
|
end
|
77
95
|
end
|
78
96
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
8
8
|
- Andy Lindeman
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain:
|
12
12
|
- |
|
@@ -44,149 +44,149 @@ cert_chain:
|
|
44
44
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
45
45
|
F3MdtaDehhjC
|
46
46
|
-----END CERTIFICATE-----
|
47
|
-
date:
|
47
|
+
date: 2024-09-03 00:00:00.000000000 Z
|
48
48
|
dependencies:
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: actionpack
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '7.0'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '7.0'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
64
|
+
name: activesupport
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '7.0'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '7.0'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: railties
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '7.0'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
90
|
+
version: '7.0'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec-core
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 3.
|
97
|
+
version: '3.13'
|
98
98
|
type: :runtime
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 3.
|
104
|
+
version: '3.13'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: rspec-expectations
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 3.
|
111
|
+
version: '3.13'
|
112
112
|
type: :runtime
|
113
113
|
prerelease: false
|
114
114
|
version_requirements: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 3.
|
118
|
+
version: '3.13'
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
120
|
name: rspec-mocks
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 3.
|
125
|
+
version: '3.13'
|
126
126
|
type: :runtime
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 3.
|
132
|
+
version: '3.13'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: rspec-support
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 3.
|
139
|
+
version: '3.13'
|
140
140
|
type: :runtime
|
141
141
|
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: 3.
|
146
|
+
version: '3.13'
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
|
-
name:
|
148
|
+
name: ammeter
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
151
|
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: 1.
|
153
|
+
version: 1.1.5
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
156
|
version_requirements: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: 1.
|
160
|
+
version: 1.1.5
|
161
161
|
- !ruby/object:Gem::Dependency
|
162
162
|
name: aruba
|
163
163
|
requirement: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: 0.
|
167
|
+
version: 0.14.12
|
168
168
|
type: :development
|
169
169
|
prerelease: false
|
170
170
|
version_requirements: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
172
|
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version: 0.
|
174
|
+
version: 0.14.12
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
|
-
name:
|
176
|
+
name: cucumber
|
177
177
|
requirement: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
179
|
- - "~>"
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
181
|
+
version: '7.0'
|
182
182
|
type: :development
|
183
183
|
prerelease: false
|
184
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
185
|
requirements:
|
186
186
|
- - "~>"
|
187
187
|
- !ruby/object:Gem::Version
|
188
|
-
version:
|
189
|
-
description: rspec-rails
|
188
|
+
version: '7.0'
|
189
|
+
description: rspec-rails integrates the Rails testing helpers into RSpec.
|
190
190
|
email: rspec@googlegroups.com
|
191
191
|
executables: []
|
192
192
|
extensions: []
|
@@ -199,20 +199,26 @@ files:
|
|
199
199
|
- LICENSE.md
|
200
200
|
- README.md
|
201
201
|
- lib/generators/rspec.rb
|
202
|
+
- lib/generators/rspec/channel/channel_generator.rb
|
203
|
+
- lib/generators/rspec/channel/templates/channel_spec.rb.erb
|
202
204
|
- lib/generators/rspec/controller/controller_generator.rb
|
203
205
|
- lib/generators/rspec/controller/templates/controller_spec.rb
|
206
|
+
- lib/generators/rspec/controller/templates/request_spec.rb
|
207
|
+
- lib/generators/rspec/controller/templates/routing_spec.rb
|
204
208
|
- lib/generators/rspec/controller/templates/view_spec.rb
|
205
209
|
- lib/generators/rspec/feature/feature_generator.rb
|
206
210
|
- lib/generators/rspec/feature/templates/feature_singular_spec.rb
|
207
211
|
- lib/generators/rspec/feature/templates/feature_spec.rb
|
212
|
+
- lib/generators/rspec/generator/generator_generator.rb
|
213
|
+
- lib/generators/rspec/generator/templates/generator_spec.rb
|
208
214
|
- lib/generators/rspec/helper/helper_generator.rb
|
209
215
|
- lib/generators/rspec/helper/templates/helper_spec.rb
|
210
216
|
- lib/generators/rspec/install/install_generator.rb
|
211
217
|
- lib/generators/rspec/install/templates/spec/rails_helper.rb
|
212
|
-
- lib/generators/rspec/integration/integration_generator.rb
|
213
|
-
- lib/generators/rspec/integration/templates/request_spec.rb
|
214
218
|
- lib/generators/rspec/job/job_generator.rb
|
215
219
|
- lib/generators/rspec/job/templates/job_spec.rb.erb
|
220
|
+
- lib/generators/rspec/mailbox/mailbox_generator.rb
|
221
|
+
- lib/generators/rspec/mailbox/templates/mailbox_spec.rb.erb
|
216
222
|
- lib/generators/rspec/mailer/mailer_generator.rb
|
217
223
|
- lib/generators/rspec/mailer/templates/fixture
|
218
224
|
- lib/generators/rspec/mailer/templates/mailer_spec.rb
|
@@ -220,17 +226,20 @@ files:
|
|
220
226
|
- lib/generators/rspec/model/model_generator.rb
|
221
227
|
- lib/generators/rspec/model/templates/fixtures.yml
|
222
228
|
- lib/generators/rspec/model/templates/model_spec.rb
|
223
|
-
- lib/generators/rspec/observer/observer_generator.rb
|
224
|
-
- lib/generators/rspec/observer/templates/observer_spec.rb
|
225
229
|
- lib/generators/rspec/request/request_generator.rb
|
230
|
+
- lib/generators/rspec/request/templates/request_spec.rb
|
226
231
|
- lib/generators/rspec/scaffold/scaffold_generator.rb
|
227
232
|
- lib/generators/rspec/scaffold/templates/api_controller_spec.rb
|
233
|
+
- lib/generators/rspec/scaffold/templates/api_request_spec.rb
|
228
234
|
- lib/generators/rspec/scaffold/templates/controller_spec.rb
|
229
235
|
- lib/generators/rspec/scaffold/templates/edit_spec.rb
|
230
236
|
- lib/generators/rspec/scaffold/templates/index_spec.rb
|
231
237
|
- lib/generators/rspec/scaffold/templates/new_spec.rb
|
238
|
+
- lib/generators/rspec/scaffold/templates/request_spec.rb
|
232
239
|
- lib/generators/rspec/scaffold/templates/routing_spec.rb
|
233
240
|
- lib/generators/rspec/scaffold/templates/show_spec.rb
|
241
|
+
- lib/generators/rspec/system/system_generator.rb
|
242
|
+
- lib/generators/rspec/system/templates/system_spec.rb
|
234
243
|
- lib/generators/rspec/view/templates/view_spec.rb
|
235
244
|
- lib/generators/rspec/view/view_generator.rb
|
236
245
|
- lib/rspec-rails.rb
|
@@ -239,10 +248,12 @@ files:
|
|
239
248
|
- lib/rspec/rails/adapters.rb
|
240
249
|
- lib/rspec/rails/configuration.rb
|
241
250
|
- lib/rspec/rails/example.rb
|
251
|
+
- lib/rspec/rails/example/channel_example_group.rb
|
242
252
|
- lib/rspec/rails/example/controller_example_group.rb
|
243
253
|
- lib/rspec/rails/example/feature_example_group.rb
|
244
254
|
- lib/rspec/rails/example/helper_example_group.rb
|
245
255
|
- lib/rspec/rails/example/job_example_group.rb
|
256
|
+
- lib/rspec/rails/example/mailbox_example_group.rb
|
246
257
|
- lib/rspec/rails/example/mailer_example_group.rb
|
247
258
|
- lib/rspec/rails/example/model_example_group.rb
|
248
259
|
- lib/rspec/rails/example/rails_example_group.rb
|
@@ -257,15 +268,22 @@ files:
|
|
257
268
|
- lib/rspec/rails/fixture_file_upload_support.rb
|
258
269
|
- lib/rspec/rails/fixture_support.rb
|
259
270
|
- lib/rspec/rails/matchers.rb
|
271
|
+
- lib/rspec/rails/matchers/action_cable.rb
|
272
|
+
- lib/rspec/rails/matchers/action_cable/have_broadcasted_to.rb
|
273
|
+
- lib/rspec/rails/matchers/action_cable/have_streams.rb
|
274
|
+
- lib/rspec/rails/matchers/action_mailbox.rb
|
260
275
|
- lib/rspec/rails/matchers/active_job.rb
|
276
|
+
- lib/rspec/rails/matchers/base_matcher.rb
|
261
277
|
- lib/rspec/rails/matchers/be_a_new.rb
|
262
278
|
- lib/rspec/rails/matchers/be_new_record.rb
|
263
279
|
- lib/rspec/rails/matchers/be_valid.rb
|
280
|
+
- lib/rspec/rails/matchers/have_enqueued_mail.rb
|
264
281
|
- lib/rspec/rails/matchers/have_http_status.rb
|
265
282
|
- lib/rspec/rails/matchers/have_rendered.rb
|
266
283
|
- lib/rspec/rails/matchers/redirect_to.rb
|
267
284
|
- lib/rspec/rails/matchers/relation_match_array.rb
|
268
285
|
- lib/rspec/rails/matchers/routing_matchers.rb
|
286
|
+
- lib/rspec/rails/matchers/send_email.rb
|
269
287
|
- lib/rspec/rails/tasks/rspec.rake
|
270
288
|
- lib/rspec/rails/vendor/capybara.rb
|
271
289
|
- lib/rspec/rails/version.rb
|
@@ -278,11 +296,11 @@ licenses:
|
|
278
296
|
- MIT
|
279
297
|
metadata:
|
280
298
|
bug_tracker_uri: https://github.com/rspec/rspec-rails/issues
|
281
|
-
changelog_uri: https://github.com/rspec/rspec-rails/blob/
|
299
|
+
changelog_uri: https://github.com/rspec/rspec-rails/blob/v7.0.1/Changelog.md
|
282
300
|
documentation_uri: https://rspec.info/documentation/
|
283
301
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
284
302
|
source_code_uri: https://github.com/rspec/rspec-rails
|
285
|
-
post_install_message:
|
303
|
+
post_install_message:
|
286
304
|
rdoc_options:
|
287
305
|
- "--charset=UTF-8"
|
288
306
|
require_paths:
|
@@ -291,15 +309,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
291
309
|
requirements:
|
292
310
|
- - ">="
|
293
311
|
- !ruby/object:Gem::Version
|
294
|
-
version:
|
312
|
+
version: 2.7.0
|
295
313
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
296
314
|
requirements:
|
297
315
|
- - ">="
|
298
316
|
- !ruby/object:Gem::Version
|
299
317
|
version: '0'
|
300
318
|
requirements: []
|
301
|
-
rubygems_version: 3.
|
302
|
-
signing_key:
|
319
|
+
rubygems_version: 3.5.11
|
320
|
+
signing_key:
|
303
321
|
specification_version: 4
|
304
322
|
summary: RSpec for Rails
|
305
323
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'generators/rspec'
|
2
|
-
|
3
|
-
module Rspec
|
4
|
-
module Generators
|
5
|
-
# @private
|
6
|
-
class IntegrationGenerator < Base
|
7
|
-
# Add a deprecation for this class, before rspec-rails 4, to use the
|
8
|
-
# `RequestGenerator` instead
|
9
|
-
class_option :request_specs,
|
10
|
-
:type => :boolean,
|
11
|
-
:default => true,
|
12
|
-
:desc => "Generate request specs"
|
13
|
-
|
14
|
-
def generate_request_spec
|
15
|
-
return unless options[:request_specs]
|
16
|
-
|
17
|
-
template 'request_spec.rb',
|
18
|
-
File.join('spec/requests', "#{name.underscore.pluralize}_spec.rb")
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'generators/rspec'
|
2
|
-
|
3
|
-
module Rspec
|
4
|
-
module Generators
|
5
|
-
# @private
|
6
|
-
class ObserverGenerator < Base
|
7
|
-
def generate_observer_spec
|
8
|
-
template 'observer_spec.rb',
|
9
|
-
File.join('spec', 'models', class_path, "#{file_name}_observer_spec.rb")
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
File without changes
|