Unverified Commit 11df2875 by Andrew W. Lee Committed by GitHub

Add integration test for `rails g annotate:install` (#783)

Add integration test that calls on rails generator.
parent 1c1c5850
......@@ -152,4 +152,20 @@ describe 'Integration testing on Rails 5.2.4.1', if: IntegrationHelper.able_to_r
end
end
end
describe 'rails g annotate:install' do
let(:command) { 'bin/rails g annotate:install' }
let(:rake_file_path) { 'lib/tasks/auto_annotate_models.rake' }
it 'generates the rake file' do
Bundler.with_clean_env do
Dir.chdir RAILS_5_2_APP_PATH do
full_path = File.expand_path(rake_file_path)
expect { `#{command}` }.to change { File.exist?(rake_file_path) }.from(false).to(true)
File.delete(full_path)
end
end
end
end
end
......@@ -167,4 +167,20 @@ describe 'Integration testing on Rails 6.0.2.1', if: IntegrationHelper.able_to_r
end
end
end
describe 'rails g annotate:install' do
let(:command) { 'bin/rails g annotate:install' }
let(:rake_file_path) { 'lib/tasks/auto_annotate_models.rake' }
it 'generates the rake file' do
Bundler.with_clean_env do
Dir.chdir RAILS_6_0_APP_PATH do
full_path = File.expand_path(rake_file_path)
expect { `#{command}` }.to change { File.exist?(rake_file_path) }.from(false).to(true)
File.delete(full_path)
end
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment