Skip to content

Commit 54ef055

Browse files
klyonradpirj
authored andcommitted
Add only one test for integration generator deprecation
1 parent 9391e81 commit 54ef055

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# Generators are not automatically loaded by Rails
22
require 'generators/rspec/integration/integration_generator'
33
require 'support/generators'
4+
require 'rspec/core/warnings'
45

56
RSpec.describe Rspec::Generators::IntegrationGenerator, type: :generator do
67
setup_default_destination
78
it_behaves_like "a request spec generator"
9+
10+
describe 'deprecation' do
11+
before do
12+
allow(RSpec).to receive(:warn_deprecation)
13+
run_generator %w[posts]
14+
end
15+
16+
it "is deprecated" do
17+
expect(RSpec).to have_received(:warn_deprecation)
18+
end
19+
end
820
end

0 commit comments

Comments
 (0)