Skip to content

Commit cf5cf63

Browse files
klyonradJonRowe
authored andcommitted
Deprecate IntegrationGenerator
1 parent 01e9dac commit cf5cf63

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/generators/rspec/integration/integration_generator.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
require 'generators/rspec'
2+
require 'rspec/core/warnings'
23

34
module Rspec
45
module Generators
56
# @private
67
class IntegrationGenerator < Base
7-
# Add a deprecation for this class, before rspec-rails 4, to use the
8-
# `RequestGenerator` instead
98
class_option :request_specs,
109
type: :boolean,
1110
default: true,
@@ -14,6 +13,12 @@ class IntegrationGenerator < Base
1413
def generate_request_spec
1514
return unless options[:request_specs]
1615

16+
RSpec.warn_deprecation <<-WARNING.gsub(/\s*\|/, ' ')
17+
|The integration generator is deprecated
18+
|and will be deleted in RSpec-Rails 5.
19+
|Please use the request generator instead.
20+
WARNING
21+
1722
template 'request_spec.rb',
1823
File.join('spec/requests', "#{name.underscore.pluralize}_spec.rb")
1924
end

0 commit comments

Comments
 (0)