[cucumber tests] make the 'print version' tests less brittle

This commit is contained in:
Joe Thornber 2013-06-25 11:11:50 +01:00
parent 51852e0aef
commit f41b0abcef
3 changed files with 8 additions and 20 deletions

View File

@ -33,3 +33,7 @@ Then /^it should give no output$/ do
output = ps.stdout + ps.stderr
output.should == ""
end
Then(/^it should pass with version$/) do
only_processes.last.stdout.chomp.should == tools_version
end

View File

@ -1,19 +1,11 @@
Feature: thin_check
Scenario: print version (-V flag)
When I run `thin_check -V`
Then it should pass with:
"""
0.1.5
"""
Then it should pass with version
Scenario: print version (--version flag)
When I run `thin_check --version`
Then it should pass with:
"""
0.1.5
"""
Then it should pass with version
Scenario: print help
When I run `thin_check --help`

View File

@ -1,19 +1,11 @@
Feature: thin_rmap
Scenario: print version (-V flag)
When I run `thin_rmap -V`
Then it should pass with:
"""
0.1.5
"""
Then it should pass with version
Scenario: print version (--version flag)
When I run `thin_rmap --version`
Then it should pass with:
"""
0.1.5
"""
Then it should pass with version
Scenario: print help
When I run `thin_rmap --help`