Skip to content
Browse files

Merge?

  • Loading branch information...
2 parents 63614ea + afd69ae commit 1899166288056c961584a318de73d5ba7e2e1265 @auxesis auxesis committed
View
37 Gemfile.lock
@@ -9,12 +9,12 @@ GIT
PATH
remote: .
specs:
- cucumber-nagios (0.9.0)
+ cucumber-nagios (0.9.1)
amqp (= 0.6.7)
aruba (>= 0.3.3)
bundler (~> 1.0.10)
cucumber (>= 0.10.0)
- cuken (>= 0.1.0)
+ cuken (>= 0.1.1)
mechanize (= 1.0.0)
net-ssh (~> 2.1.0)
rspec (>= 2.5.0)
@@ -27,34 +27,34 @@ GEM
specs:
amqp (0.6.7)
eventmachine (>= 0.12.4)
- aruba (0.3.3)
- childprocess (~> 0.1.7)
- cucumber (~> 0.10)
- rspec (~> 2.5)
+ aruba (0.3.6)
+ childprocess (>= 0.1.7)
+ cucumber (>= 0.10.0)
+ rspec (>= 2.5.0)
builder (3.0.0)
- childprocess (0.1.7)
- ffi (~> 0.6.3)
- cucumber (0.10.0)
+ childprocess (0.1.8)
+ ffi (~> 1.0.6)
+ cucumber (0.10.2)
builder (>= 2.1.2)
- diff-lcs (~> 1.1.2)
- gherkin (~> 2.3.2)
- json (~> 1.4.6)
- term-ansicolor (~> 1.0.5)
+ diff-lcs (>= 1.1.2)
+ gherkin (>= 2.3.5)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.5)
cuken (0.1.1)
aruba (~> 0.3.3)
ssh-forever
diff-lcs (1.1.2)
eventmachine (0.12.10)
extlib (0.9.15)
- ffi (0.6.3)
+ ffi (1.0.7)
rake (>= 0.8.7)
- gherkin (2.3.4)
- json (~> 1.4.6)
+ gherkin (2.3.6)
+ json (>= 1.4.6)
highline (1.6.1)
- json (1.4.6)
+ json (1.5.1)
mechanize (1.0.0)
nokogiri (>= 1.2.1)
- net-ssh (2.1.3)
+ net-ssh (2.1.4)
nokogiri (1.4.4)
open4 (1.0.1)
rack (1.2.2)
@@ -83,6 +83,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ aruba (>= 0.3.6)
cucumber-nagios!
rake (>= 0.8.3)
ssh-forever (>= 0.4.0)!
View
9 README.md
@@ -21,7 +21,7 @@ Quickstart
4. `cd bunch-o-tests`
5. `bundle install`
6. `cucumber-nagios-gen feature ebay.com.au bidding`
- 7. `bin/cucumber-nagios features/ebay.com.au/bidding.feature`
+ 7. `cucumber-nagios features/ebay.com.au/bidding.feature`
Installing
==========
@@ -30,8 +30,9 @@ Install the gem with:
gem install cucumber-nagios
-This will add the `cucumber-nagios-gen` command to your path, and make the
-shipped cucumber-nagios steps available to other projects using Cucumber.
+This will add the `cucumber-nagios-gen` and `cucumber-nagios` commands to your
+path, and make the shipped cucumber-nagios steps available to other projects
+using Cucumber.
*Windows users* - you need to download and install the
[Ruby Installer](http://rubyinstaller.org/downloads/) and the
@@ -165,7 +166,7 @@ Running
Invoke the Cucumber feature with the `cucumber-nagios` script:
- bin/cucumber-nagios features/smh.com.au/smh.feature
+ cucumber-nagios features/smh.com.au/smh.feature
`cucumber-nagios` can be run from anywhere:
View
1 bin/cucumber-nagios-gen
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'rubygems'
require 'templater'
View
1 cucumber-nagios.gemspec
@@ -31,4 +31,5 @@ Gem::Specification.new do |s|
s.add_runtime_dependency "amqp", "= 0.6.7"
s.add_runtime_dependency "bundler", "~> 1.0.10"
s.add_development_dependency "rake", ">= 0.8.3"
+ s.add_development_dependency "aruba", ">= 0.3.6"
end
View
40 features/creating.feature
@@ -1,40 +0,0 @@
-# For complete reusable step listings see:
-# lib/aruba/cucumber.rb
-# https://github.com/aslakhellesoy/aruba/blob/master/lib/aruba/cucumber.rb
-# AND
-# lib/cuken/*.rb
-# https://github.com/hedgehog/cuken
-
-Feature: Creating new project
- To test websites
- A cucumber-nagios project
- Must be created
-
- Background:
- Given cucumber-nagios is installed
-
- @create
- Scenario: Create a project
- Given I successfully run "cucumber-nagios-gen project great-website-tests"
- When I cd to "great-website-tests"
- Then these directories exist:
- | features/steps |
- | features/support |
- And these files exist:
- | features/support/env.rb |
- | features/steps/amqp_steps.rb |
- | features/steps/benchmark_steps.rb |
- | features/steps/command_steps.rb |
- | features/steps/dns_steps.rb |
- | features/steps/file_steps.rb |
- | features/steps/http_header_steps.rb |
- | features/steps/http_steps.rb |
- | features/steps/ping_steps.rb |
- | features/steps/ssh_steps.rb |
-
- @create
- Scenario: Pretend to create a project
- Given I successfully run "cucumber-nagios-gen project --pretend greatest-website-tests"
- Then these directories do not exist:
- | greatest-website-tests/features/steps |
- | greatest-website-tests/features/support |
View
22 features/installing.feature
@@ -1,22 +0,0 @@
-# For complete reusable step listings see:
-# lib/aruba/cucumber.rb
-# https://github.com/aslakhellesoy/aruba/blob/master/lib/aruba/cucumber.rb
-# AND
-# lib/cuken/*.rb
-# https://github.com/hedgehog/cuken
-
-Feature: Installation
- To set up a cucumber-nagios project
- A user
- Must be able to install the gem
-
- Background:
- Given I build the gem
-
- @install
- Scenario: Installing the gem
- Given I install the latest gem
- When I successfully run "which cucumber-nagios-gen"
- When I successfully run "which cucumber-nagios"
- Then I successfully run "cucumber-nagios-gen project testproj"
-
View
6 features/steps/creating_steps.rb
@@ -1,6 +0,0 @@
-Given /^cucumber\-nagios is installed$/ do
- Given %Q{I build the gem}
- When %Q{I install the latest gem}
- Then %Q{I successfully run "which cucumber-nagios-gen"}
- And %Q{I successfully run "which cucumber-nagios"}
-end
View
25 features/steps/using_steps.rb
@@ -1,25 +0,0 @@
-# Most steps are now described using Aruba's steps.
-#
-# For an example see:
-# ./cucumber-nagios/features/ssh.feature
-#
-# For step definitions see:
-# ./cucumber-nagios/lib/cuken/cucumber/ssh.rb
-#
-# For the SSH api see:
-# ./cucumber-nagios/lib/cuken/api/ssh.rb
-#
-# To use step definitions in your cucumber
-# feature files, add to env.rb:
-#
-# require 'cuken/ssh'
-#
-# Enjoy.
-#
-
-#
-# Some WWW access features/steps can take a while:
-#
-Before do
- @aruba_timeout_seconds.nil? || @aruba_timeout_seconds < 30 ? @aruba_timeout_seconds = 10 : @aruba_timeout_seconds
-end
View
1 features/support/env.rb
@@ -13,6 +13,7 @@
require 'cucumber/nagios/steps'
require 'webrat_logging_patches'
+require 'aruba/cucumber'
World do
Webrat::Session.new(Webrat::MechanizeAdapter.new)
View
87 features/using.feature
@@ -1,87 +0,0 @@
-# For complete reusable step listings see:
-# lib/aruba/cucumber.rb
-# https://github.com/aslakhellesoy/aruba/blob/master/lib/aruba/cucumber.rb
-# AND
-# lib/cuken/*.rb
-# https://github.com/hedgehog/cuken
-
-Feature: Using features
- To test websites
- And other infrastructure
- An operator
- Needs helper tools
- To create and run features
-
- Background:
- Given cucumber-nagios is installed
- Given I successfully run "cucumber-nagios-gen project using-tests"
- And I cd to "using-tests"
-
- @using
- Scenario: Create a feature
- Given I successfully run "cucumber-nagios-gen feature github.com login"
- Then the output should contain:
- """
- Generating with project generator:
- [ADDED] .gitignore
- [ADDED] .bzrignore
- [ADDED] Gemfile
- [ADDED] features/steps
- [ADDED] features/support
- [ADDED] README
-
- Your new cucumber-nagios project can be found in /usr/src/cucumber-nagios/tmp/aruba/using-tests.
-
- Next, install the necessary RubyGems with:
-
- bundle install
-
- Your project has been initialised as a git repository.
-
- Generating with feature generator:
- [ADDED] features/github.com/login.feature
- [ADDED] features/github.com/steps/login_steps.rb
- """
-
- @using
- Scenario: Run a successful feature
- Given I successfully run "cucumber-nagios-gen feature google.com homepage"
- When I successfully run "cucumber-nagios features/google.com/homepage.feature"
- Then the output should contain:
- """
- CUCUMBER OK - Critical: 0, Warning: 0, 2 okay | passed=2; failed=0; nosteps=0; total=2;
- """
-
- @using
- Scenario: Run a feature without steps
- Given I successfully run "cucumber-nagios-gen feature github.com profile"
- And the file "features/github.com/profile.feature" with:
- """
- Feature: Failure
- Scenario: The only option
- Given the output should contain "supercalifragilisticexpialidocious"
- """
- When I run "cucumber-nagios features/google.com/profile.feature"
- Then the exit status should be 4
-
-# We should really switch to Capybara and friends ASAP
-# @using
-# Scenario: webrat.log output
-# When I generate the feature "homepage" for "github.com"
-# Then the "homepage" feature on "github.com" should exit cleanly
-# Then "webrat.log" in the "passing-features" project should not exist
-
- @using
- Scenario: Multiline output
- Given I successfully run "cucumber-nagios-gen feature google.com profile"
- And the file "features/google.com/profile.feature" with:
- """
- Feature: Failure
- Scenario: The only option
- Given the output should contain "supercalifragilisticexpialidocious"
- """
- When I run "cucumber-nagios features/google.com/profile.feature"
- Then the output from "cucumber-nagios features/google.com/profile.feature" contains:
- """
- CUCUMBER CRITICAL - Critical: 1, Warning: 0, 0 okay | passed=0; failed=1; nosteps=0; total=1;
- """

0 comments on commit 1899166

Please sign in to comment.
Something went wrong with that request. Please try again.