Skip to content

Commit

Permalink
No class vars at toplevel
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed May 23, 2024
1 parent a598f80 commit e31c0f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/spec/ruby/jruby/rack/app_layout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@

shared_examples "FileSystemLayout" do

@@__work_dir__ = Dir.pwd
__work_dir__ = Dir.pwd

before do
require 'tmpdir'
Dir.chdir Dir.mktmpdir
end

after do
Dir.chdir @@__work_dir__
Dir.chdir __work_dir__
end

it "sets app and public uri defaults based on a typical (Rails/Rack) app" do
Expand Down
12 changes: 6 additions & 6 deletions src/spec/ruby/jruby/rack/booter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

after(:all) { JRuby::Rack.context = nil }

@@rack_env = ENV['RACK_ENV']
@@gem_path = Gem.path.dup
@@env_gem_path = ENV['GEM_PATH']
rack_env = ENV['RACK_ENV']
gem_path = Gem.path.dup
env_gem_path = ENV['GEM_PATH']

after do
@@rack_env.nil? ? ENV.delete('RACK_ENV') : ENV['RACK_ENV'] = @@rack_env
Gem.path.replace(@@gem_path)
@@env_gem_path.nil? ? ENV.delete('GEM_PATH') : ENV['GEM_PATH'] = @@env_gem_path
rack_env.nil? ? ENV.delete('RACK_ENV') : ENV['RACK_ENV'] = rack_env
Gem.path.replace(gem_path)
env_gem_path.nil? ? ENV.delete('GEM_PATH') : ENV['GEM_PATH'] = env_gem_path
end

it "should determine the public html root from the 'public.root' init parameter" do
Expand Down

0 comments on commit e31c0f0

Please sign in to comment.