summaryrefslogtreecommitdiff
path: root/test/tc_simulator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/tc_simulator.rb')
-rw-r--r--test/tc_simulator.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tc_simulator.rb b/test/tc_simulator.rb
index ac81748..a34f63a 100644
--- a/test/tc_simulator.rb
+++ b/test/tc_simulator.rb
@@ -20,4 +20,14 @@ class SimulatorTest < Test::Unit::TestCase
assert_equal '18', age
end
end
+
+ def test_simulate_with_echo_and_frozen_strings
+ HighLine::Simulate.with('the password'.freeze) do
+ password = ask('What is your password?') do |q|
+ q.echo = '*'
+ end
+
+ assert_equal 'the password', password
+ end
+ end
end \ No newline at end of file