From b7bdf1a3f2a3486a5c5d2200ec167c73154be84e Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 27 Jun 2013 09:40:43 +0100 Subject: [PATCH] Add feature file for thin_restore. --- features/step_definitions/thin_steps.rb | 4 +++ features/thin_restore.feature | 42 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 features/thin_restore.feature diff --git a/features/step_definitions/thin_steps.rb b/features/step_definitions/thin_steps.rb index 9aa7b64..a2dbd66 100644 --- a/features/step_definitions/thin_steps.rb +++ b/features/step_definitions/thin_steps.rb @@ -28,6 +28,10 @@ When(/^I run thin_rmap with (.*?)$/) do |opts| run_simple("thin_rmap #{opts} #{dev_file}", false) end +When(/^I run thin_restore with (.*?)$/) do |opts| + run_simple("thin_restore #{opts}", false) +end + Then /^it should give no output$/ do ps = only_processes.last output = ps.stdout + ps.stderr diff --git a/features/thin_restore.feature b/features/thin_restore.feature new file mode 100644 index 0000000..22d4b4a --- /dev/null +++ b/features/thin_restore.feature @@ -0,0 +1,42 @@ +Feature: thin_restore + Scenario: print version (-V flag) + When I run thin_restore with -V + Then it should pass with version + + Scenario: print version (--version flag) + When I run thin_restore with --version + Then it should pass with version + + Scenario: print help (-h) + When I run thin_restore with -h + Then it should pass with: + + """ + Usage: thin_restore [options] + Options: + {-h|--help} + {-i|--input} + {-o|--output} + {-V|--version} + """ + + Scenario: print help (--help) + When I run thin_restore with -h + Then it should pass with: + + """ + Usage: thin_restore [options] + Options: + {-h|--help} + {-i|--input} + {-o|--output} + {-V|--version} + """ + + @announce + Scenario: missing input file + When I run thin_restore with -o metadata.bin + Then it should fail with: + """ + No input file provided. + """ \ No newline at end of file