From 81d4e5523fb41cf511b7c501e8fcb2d0c87852c0 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 20 Mar 2013 19:44:09 +0000 Subject: [PATCH] Some trivial cucumber tests --- .ruby-version | 1 + Gemfile | 6 ++++++ Gemfile.lock | 30 ++++++++++++++++++++++++++++ features/support/aruba.rb | 4 ++++ features/thin_check.feature | 40 +++++++++++++++++++++++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 .ruby-version create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 features/support/aruba.rb create mode 100644 features/thin_check.feature diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..ae6d5b9 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +1.9.3-p392 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..16a69e5 --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +group :test do + gem 'cucumber', '1.2.3' + gem 'aruba', '0.5.1' +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..16a7ea2 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,30 @@ +GEM + remote: https://rubygems.org/ + specs: + aruba (0.5.1) + childprocess (~> 0.3.6) + cucumber (>= 1.1.1) + rspec-expectations (>= 2.7.0) + builder (3.2.0) + childprocess (0.3.9) + ffi (~> 1.0, >= 1.0.11) + cucumber (1.2.3) + builder (>= 2.1.2) + diff-lcs (>= 1.1.3) + gherkin (~> 2.11.6) + multi_json (~> 1.3) + diff-lcs (1.2.1) + ffi (1.4.0) + gherkin (2.11.6) + json (>= 1.7.6) + json (1.7.7) + multi_json (1.7.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + +PLATFORMS + ruby + +DEPENDENCIES + aruba (= 0.5.1) + cucumber (= 1.2.3) diff --git a/features/support/aruba.rb b/features/support/aruba.rb new file mode 100644 index 0000000..45b463c --- /dev/null +++ b/features/support/aruba.rb @@ -0,0 +1,4 @@ +require 'aruba/cucumber' + +STDERR.puts "pwd = #{Dir::pwd}" +ENV['PATH'] = "#{Dir::pwd}:#{ENV['PATH']}" diff --git a/features/thin_check.feature b/features/thin_check.feature new file mode 100644 index 0000000..ee61e06 --- /dev/null +++ b/features/thin_check.feature @@ -0,0 +1,40 @@ +Feature: thin_check + Scenario: print version (-V flag) + When I run `thin_check -V` + Then it should pass with: + + """ + 0.1.5 + """ + + Scenario: print version (--version flag) + When I run `thin_check --version` + Then it should pass with: + + """ + 0.1.5 + """ + + Scenario: print help + When I run `thin_check --help` + Then it should pass with: + + """ + Usage: thin_check [options] {device|file} + Options: + {-q|--quiet} + {-h|--help} + {-V|--version} + """ + + Scenario: print help + When I run `thin_check -h` + Then it should pass with: + + """ + Usage: thin_check [options] {device|file} + Options: + {-q|--quiet} + {-h|--help} + {-V|--version} + """