summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr. <abinoam@gmail.com>2015-06-29 22:18:46 -0300
committerAbinoam P. Marques Jr. <abinoam@gmail.com>2015-06-29 22:18:46 -0300
commit327051c1c217df2880c3a53f31484f7e815e847f (patch)
tree9a9d69aeb36dda31c38385ebfb8439fdfda7ef4e
parent578c74bc52f25525bb3b9152b551631f8d2c1f13 (diff)
parent0c3809f58e9398e4a32b27cc2cdd6b26b38611ca (diff)
downloadhighline-327051c1c217df2880c3a53f31484f7e815e847f.tar.gz
Merge pull request #143 from abinoam/issue_142v1.7.3
Add HighLine::Simulator test - Closes #142
-rw-r--r--.travis.yml2
-rw-r--r--Changelog.md3
-rw-r--r--lib/highline/version.rb2
-rw-r--r--test/tc_simulator.rb23
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