Skip to content

Commit

Permalink
Merge pull request #604 from pvdb/system_dir_ivar
Browse files Browse the repository at this point in the history
refactor: remove "exposed" `@system_dir` instance variable (in helper method)
  • Loading branch information
hsbt authored Dec 9, 2024
2 parents cbea814 + 24a583e commit 2e9a25b
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 2e9a25b

Please sign in to comment.