Sha256: e23e31e1615a572731af16dd0e3a9f92f0982aaf29b334c93618d73a18b017ce
Contents?: true
Size: 700 Bytes
Versions: 4
Compression:
Stored size: 700 Bytes
Contents
require 'test_helper' class REPLTest < ActiveSupport::TestCase setup do @repl1 = @repl = WebConsole::REPL.new @repl2 = WebConsole::REPL.new end test 'sending input returns the result as output' do assert_equal "=> 42\n", @repl.send_input('foo = 42') end test 'preserves the session in the binding' do assert_equal "=> 42\n", @repl.send_input('foo = 42') assert_equal "=> 50\n", @repl.send_input('foo + 8') end test 'session preservation requires same bindings' do assert_equal "=> 42\n", @repl1.send_input('foo = 42') assert_equal "=> 42\n", @repl2.send_input('foo') end test 'prompt is present' do assert_not_nil @repl.prompt end end
Version data entries
4 entries across 4 versions & 1 rubygems