Skip to content

Commit

Permalink
Refactor "exposed" @system_dir instance variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdb committed Nov 11, 2024
1 parent 42ed2f5 commit 24a583e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ def ignore_deprecations
end

def rake_system_dir
@system_dir = "system"
system_dir = "system"

FileUtils.mkdir_p @system_dir
FileUtils.mkdir_p system_dir

File.write File.join(@system_dir, "sys1.rake"), <<~SYS
File.write File.join(system_dir, "sys1.rake"), <<~SYS
task "sys1" do
puts "SYS1"
end
SYS

ENV["RAKE_SYSTEM"] = @system_dir
ENV["RAKE_SYSTEM"] = system_dir
end

def rakefile(contents)
Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def test_load_from_system_rakefile
load_rakefile
end

assert_equal @system_dir, @app.system_dir
assert_equal "system", @app.system_dir
assert_nil @app.rakefile
rescue SystemExit
flunk "failed to load rakefile"
Expand Down

0 comments on commit 24a583e

Please sign in to comment.