Skip to content

Commit c83e452

Browse files
committed
Add test for rails g annotate:install
1 parent c9e85d3 commit c83e452

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

spec/integration/rails_5.2.4.1_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,18 @@
152152
end
153153
end
154154
end
155+
156+
describe 'rails g annotate:install' do
157+
let(:command) { 'bin/rails g annotate:install' }
158+
let(:rake_file_path) { 'lib/tasks/auto_annotate_models.rake' }
159+
160+
it 'generates the rake file' do
161+
Bundler.with_clean_env do
162+
Dir.chdir RAILS_5_2_APP_PATH do
163+
full_path = File.expand_path(rake_file_path)
164+
expect { `#{command}` }.to change { File.exist?(rake_file_path) }.from(false).to(true)
165+
end
166+
end
167+
end
168+
end
155169
end

0 commit comments

Comments
 (0)