We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee261ba commit 62b7332Copy full SHA for 62b7332
test/web_console/session_test.rb
@@ -39,6 +39,15 @@ def initialize(line)
39
assert_equal session.eval('__FILE__'), "=> \"#{__FILE__}\"\n"
40
end
41
42
+ test 'use first binding if no application bindings' do
43
+ binding = Object.new
44
+ binding.expects(:eval).with('__FILE__').returns 'framework'
45
+ binding.expects(:eval).with('called?').returns 'yes'
46
+
47
+ session = Session.new(binding)
48
+ assert_equal session.eval('called?'), "=> \"yes\"\n"
49
+ end
50
51
test '#from can create session from a single binding' do
52
saved_line, saved_binding = __LINE__, binding
53
Thread.current[:__web_console_binding] = saved_binding
0 commit comments