Skip to content

Commit ad4f9ba

Browse files
committed
Use unique constants
A hacky approach to solving these constants polluting the global namespace.
1 parent af42826 commit ad4f9ba

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

spec/integration/rails_5.2.4.1_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
require_relative 'integration_helper'
55

66
describe 'Integration testing on Rails 5.2.4.1', if: IntegrationHelper.able_to_run?(__FILE__, RUBY_VERSION) do
7-
::APP_NAME = 'rails_5.2.4.1'.freeze
8-
::PROJECT_PATH = File.expand_path('../..', __dir__)
9-
::APP_PATH = File.expand_path(APP_NAME, __dir__)
7+
::RAILS_5_2_APP_NAME = 'rails_5.2.4.1'.freeze
8+
::RAILS_5_2_PROJECT_PATH = File.expand_path('../..', __dir__).freeze
9+
::RAILS_5_2_APP_PATH = File.expand_path(RAILS_5_2_APP_NAME, __dir__).freeze
1010

11-
let!(:git) { Git.open(PROJECT_PATH) }
11+
let!(:git) { Git.open(RAILS_5_2_PROJECT_PATH) }
1212

1313
before(:all) do
1414
Bundler.with_clean_env do
15-
Dir.chdir APP_PATH do
15+
Dir.chdir RAILS_5_2_APP_PATH do
1616
puts `bundle install`
1717
puts `bin/rails db:migrate`
1818
end
@@ -92,7 +92,7 @@
9292

9393
it 'annotate models' do
9494
Bundler.with_clean_env do
95-
Dir.chdir APP_PATH do
95+
Dir.chdir RAILS_5_2_APP_PATH do
9696
expect(git.diff.any?).to be_falsy
9797

9898
puts `#{command}`
@@ -142,7 +142,7 @@
142142

143143
it 'annotate routes.rb' do
144144
Bundler.with_clean_env do
145-
Dir.chdir APP_PATH do
145+
Dir.chdir RAILS_5_2_APP_PATH do
146146
expect(git.diff.any?).to be_falsy
147147

148148
puts `#{command}`

spec/integration/rails_6.0.2.1_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
require_relative 'integration_helper'
55

66
describe 'Integration testing on Rails 6.0.2.1', if: IntegrationHelper.able_to_run?(__FILE__, RUBY_VERSION) do
7-
::APP_NAME = 'rails_6.0.2.1'.freeze
8-
::PROJECT_PATH = File.expand_path('../..', __dir__)
9-
::APP_PATH = File.expand_path(APP_NAME, __dir__)
7+
::RAILS_6_0_APP_NAME = 'rails_6.0.2.1'.freeze
8+
::RAILS_6_0_PROJECT_PATH = File.expand_path('../..', __dir__).freeze
9+
::RAILS_6_0_APP_PATH = File.expand_path(RAILS_6_0_APP_NAME, __dir__).freeze
1010

11-
let!(:git) { Git.open(PROJECT_PATH) }
11+
let!(:git) { Git.open(RAILS_6_0_PROJECT_PATH) }
1212

1313
before(:all) do
1414
Bundler.with_clean_env do
15-
Dir.chdir APP_PATH do
15+
Dir.chdir RAILS_6_0_APP_PATH do
1616
puts `bundle install`
1717
puts `bin/rails db:migrate`
1818
end
@@ -92,7 +92,7 @@
9292

9393
it 'annotate models' do
9494
Bundler.with_clean_env do
95-
Dir.chdir APP_PATH do
95+
Dir.chdir RAILS_6_0_APP_PATH do
9696
expect(git.diff.any?).to be_falsy
9797

9898
puts `#{command}`
@@ -157,7 +157,7 @@
157157

158158
it 'annotate routes.rb' do
159159
Bundler.with_clean_env do
160-
Dir.chdir APP_PATH do
160+
Dir.chdir RAILS_6_0_APP_PATH do
161161
expect(git.diff.any?).to be_falsy
162162

163163
puts `#{command}`

0 commit comments

Comments
 (0)