diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | Changelog.md | 3 | ||||
-rw-r--r-- | lib/highline/version.rb | 2 | ||||
-rw-r--r-- | test/tc_simulator.rb | 23 |
4 files changed, 29 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 87c2844..f4ee366 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ rvm: - 2.0.0 - 2.1.5 - 2.2.0 + - 2.2.1 + - 2.2.2 - rbx-2 notifications: email: false diff --git a/Changelog.md b/Changelog.md index 49e533e..ae7368b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,9 @@ Below is a complete listing of changes for each revision of HighLine. +### 1.7.3 / 2015-06-29 +* Add HighLine::Simulator tests (Bala Paranj (@bparanj) and Abinoam Marques Jr. (@abinoam), #142, PR #143) + ### 1.7.2 / 2015-04-19 #### Bug fixes diff --git a/lib/highline/version.rb b/lib/highline/version.rb index 618c4cd..65be5ed 100644 --- a/lib/highline/version.rb +++ b/lib/highline/version.rb @@ -1,4 +1,4 @@ class HighLine # The version of the installed library. - VERSION = "1.7.2".freeze + VERSION = "1.7.3".freeze end diff --git a/test/tc_simulator.rb b/test/tc_simulator.rb new file mode 100644 index 0000000..ac81748 --- /dev/null +++ b/test/tc_simulator.rb @@ -0,0 +1,23 @@ +require 'test/unit' +require 'highline/import' +require 'highline/simulate' + +class SimulatorTest < Test::Unit::TestCase + def setup + input = StringIO.new + output = StringIO.new + $terminal = HighLine.new(input, output) + end + + def test_simulator + HighLine::Simulate.with('Bugs Bunny', '18') do + name = ask('What is your name?') + + assert_equal 'Bugs Bunny', name + + age = ask('What is your age?') + + assert_equal '18', age + end + end +end
\ No newline at end of file |