Skip to content

Commit

Permalink
Drop installing-feature and change tests that rely on installed gem
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernalbers committed Apr 17, 2011
1 parent 8caee91 commit 79f4596
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 44 deletions.
17 changes: 9 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ GEM
specs:
amqp (0.6.7)
eventmachine (>= 0.12.4)
aruba (0.3.6)
childprocess (>= 0.1.7)
cucumber (>= 0.10.0)
rspec (>= 2.5.0)
builder (3.0.0)
childprocess (0.1.8)
ffi (~> 1.0.6)
cucumber (0.10.0)
builder (>= 2.1.2)
diff-lcs (~> 1.1.2)
Expand All @@ -26,6 +32,8 @@ GEM
diff-lcs (1.1.2)
eventmachine (0.12.10)
extlib (0.9.15)
ffi (1.0.7)
rake (>= 0.8.7)
gherkin (2.3.3)
json (~> 1.4.6)
highline (1.6.1)
Expand Down Expand Up @@ -60,13 +68,6 @@ PLATFORMS
ruby

DEPENDENCIES
amqp (= 0.6.7)
bundler (~> 1.0.7)
cucumber (>= 0.10.0)
aruba (>= 0.3.6)
cucumber-nagios!
mechanize (= 1.0.0)
net-ssh (~> 2.1.0)
rake (>= 0.8.3)
rspec (>= 2.3.0)
templater (>= 1.0.0)
webrat (= 0.7.2)
1 change: 1 addition & 0 deletions bin/cucumber-nagios-gen
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')

require 'rubygems'
require 'templater'
Expand Down
1 change: 1 addition & 0 deletions cucumber-nagios.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ Gem::Specification.new do |s|
s.add_runtime_dependency "amqp", "= 0.6.7"
s.add_runtime_dependency "bundler", "~> 1.0.7"
s.add_development_dependency "rake", ">= 0.8.3"
s.add_development_dependency "aruba", ">= 0.3.6"
end
23 changes: 11 additions & 12 deletions features/creating.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ Feature: Creating new project
A cucumber-nagios project
Must be created

@create
Scenario: Create a project
Given cucumber-nagios is installed
When I create a new project called "great-website-tests"
And I freeze in dependencies
Then a Gemfile lock should be created
@create
Scenario: Create a project
When I run `cucumber-nagios-gen project great-website-tests`
And I cd to "great-website-tests"
And I run `bundle install --local`
Then a file named "Gemfile.lock" should exist

@create
Scenario: Pretend to create a project
When I run `cucumber-nagios-gen project --pretend great-website-tests`
Then a directory named "great-website-tests" should not exist

@create
Scenario: Pretend to create a project
Given cucumber-nagios is installed
When I pretend to create a new project called "greatest-website-tests"
Then I do not freeze in dependencies
And a Gemfile lock should not be created
13 changes: 0 additions & 13 deletions features/installing.feature

This file was deleted.

11 changes: 2 additions & 9 deletions features/steps/creating_steps.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
Given /^cucumber\-nagios is installed$/ do
When 'I build the gem'
And 'I install the latest gem'
Then 'I should have "cucumber-nagios-gen" on my path'
And 'I should have "cucumber-nagios" on my path'
end

When /^I create a new project called "([^\"]*)"$/ do |project_name|
@project_name = project_name
FileUtils.rm_rf("/tmp/#{@project_name}")

Dir.chdir("/tmp") do
silent_system("cucumber-nagios-gen project #{@project_name}").should be_true
end
Expand All @@ -17,7 +10,7 @@
When /^I pretend to create a new project called "([^\"]*)"$/ do |project_name|
@project_name = project_name
FileUtils.rm_rf("/tmp/#{@project_name}") if File.directory?("/tmp/#{@project_name}")

Dir.chdir("/tmp") do
silent_system("cucumber-nagios-gen project --pretend #{@project_name}").should be_true
end
Expand Down
1 change: 0 additions & 1 deletion features/steps/using_steps.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Given /^a project called "([^\"]*)" is created and frozen$/ do |project_name|
@project_name = project_name
Given 'cucumber-nagios is installed'
When "I create a new project called \"#{@project_name}\""
And 'I freeze in dependencies'
Then 'a Gemfile lock should be created'
Expand Down
1 change: 1 addition & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

require 'cucumber/nagios/steps'
require 'webrat_logging_patches'
require 'aruba/cucumber'

World do
Webrat::Session.new(Webrat::MechanizeAdapter.new)
Expand Down
1 change: 0 additions & 1 deletion features/using.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Feature: Using features

@using
Scenario: Create a feature
Given cucumber-nagios is installed
And a project called "more-great-tests" is created and frozen
When I generate a new feature called "login" for "github.com"
Then a feature file should exist for "login" on "github.com"
Expand Down

0 comments on commit 79f4596

Please sign in to comment.