From 5f778db32227fa4706991f59ea253f084d037ed3 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 19 Jun 2013 14:36:09 +0100 Subject: [PATCH] More work on the thin_check --quiet feature --- features/step_definitions/thin_steps.rb | 5 +++++ features/thin_check.feature | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/features/step_definitions/thin_steps.rb b/features/step_definitions/thin_steps.rb index 0020bfd..27f5118 100644 --- a/features/step_definitions/thin_steps.rb +++ b/features/step_definitions/thin_steps.rb @@ -28,3 +28,8 @@ When(/^I run thin_rmap with (.*?)$/) do |opts| run_simple("thin_rmap #{opts} #{dev_file}", false) end +Then /^it should give no output$/ do + ps = only_processes.last + output = ps.stdout + ps.stderr + output.should == "" +end diff --git a/features/thin_check.feature b/features/thin_check.feature index c6c614c..573a379 100644 --- a/features/thin_check.feature +++ b/features/thin_check.feature @@ -77,6 +77,11 @@ Feature: thin_check Scenario: -q should give no output Given a corrupt superblock When I run thin_check with --quiet - Then it should fail with: - """ - """ \ No newline at end of file + Then it should fail + And it should give no output + + Scenario: --quiet should give no output + Given a corrupt superblock + When I run thin_check with --quiet + Then it should fail + And it should give no output