Skip to content

Commit

Permalink
Mixlib CLI skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Atalanta committed Apr 15, 2012
1 parent ccd5ccc commit 930b341
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
16 changes: 12 additions & 4 deletions features/packaging-building.feature
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
Feature: Building a package

So that I can provide Solaris customers with the fruits of our labour,
As a member of the Opscode Engineering team,
I can build a self-contained "Chef Full" package

Background:
Given a copy of the kodoyanpe tool

Scenario: Get help
When I run the command without options
Then I see some help text

So that I can provide Solaris customers with the fruits of our labour,
As a member of the Opscode Engineering team,
I can build a self-contained "Chef Full" package

Scenario: Build Solaris 10 SPARC Package
Given a copy of the kodoyanpe tool
When I run the command
And I specify "sparc" as the architecture
And I specify "5.10" as the version
Then I should get a package of the latest Chef client accessible from my workstation

9 changes: 9 additions & 0 deletions features/step_definitions/kodoyanpe_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
silent_system("which kodoyanpe").should be_true
end


When /^I run the command without options$/ do
@help_text = %x[kodoyanpe]
end

Then /^I see some help text$/ do
@help_text.include?("Kodoyanpe builds Chef-full packages for Solaris").should be_true
end

When /^I run the command$/ do
pending # express the regexp above with the code you wish you had
end
Expand Down
3 changes: 1 addition & 2 deletions features/support/silent_system.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
def silent_system(cmd)
# silent_cmd = cmd + " 2>&1 > /dev/null"
silent_cmd = cmd
silent_cmd = cmd + " 2>&1 > /dev/null"
system(silent_cmd)
end
2 changes: 1 addition & 1 deletion kodoyanpe.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Gem::Specification.new do |s|
# specify any dependencies here; for example:
s.add_development_dependency "cucumber"
s.add_development_dependency "rspec-expectations"
# s.add_runtime_dependency "rest-client"
s.add_runtime_dependency "mixlib-cli"
end

0 comments on commit 930b341

Please sign in to comment.