Skip to content

Commit 2ebded8

Browse files
committed
Replace WorkspaceStack unit tests with an irb_load test
The unit tests repeated what the workspace command tests already cover through real sessions. Test the behavior change instead: a file loaded into a private module with irb_load now has helper methods like conf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175QjMQGeUPByLSqoL6ye5U
1 parent f3a4c9c commit 2ebded8

2 files changed

Lines changed: 9 additions & 69 deletions

File tree

‎test/irb/test_command.rb‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,15 @@ def test_irb_load
450450
], out)
451451
end
452452

453+
def test_irb_load_in_private_module_has_helper_methods
454+
File.write("#{@tmpdir}/a.rb", "conf.class\n")
455+
out, err = execute_lines(
456+
"irb_load '#{@tmpdir}/a.rb', true\n",
457+
)
458+
assert_empty err
459+
assert_match(/=> IRB::Context\n/, out)
460+
end
461+
453462
def test_irb_load_without_argument
454463
out, err = execute_lines(
455464
"irb_load\n",

‎test/irb/test_workspace_stack.rb‎

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)