Permalink
Browse files

remove unneeded spec. fix cuke.

  • Loading branch information...
1 parent 8edcd9e commit 74413e93943fe575a2dae136d4b4f47f1417bca6 @justinko justinko committed Jan 28, 2011
Showing with 14 additions and 31 deletions.
  1. +9 −7 features/help.feature
  2. +5 −6 spec/relish/commands/config_spec.rb
  3. +0 −18 spec/relish/commands/push_spec.rb
View
16 features/help.feature
@@ -1,9 +1,9 @@
@announce
Feature: Help
-
+
The `relish help` command displays all available commands
along with a description of each.
-
+
Scenario: View all available commands with the help command
When I successfully run "relish help"
Then the output should contain exactly:
@@ -15,7 +15,7 @@ Feature: Help
If you leave off the organization or user handle, then it defaults
to the user (you).
-
+
=== Available Commands
help # show this usage
@@ -32,10 +32,12 @@ Feature: Help
# example: relish projects:visibility rspec/rspec-core:private
projects:rename <project>:<new handle> # rename a project's handle
# example: relish projects:rename rspec/rspec-core:rspec-corez
- push <project>:<version> # push features to relishapp.com
+ push <project>:<version> # push features to a project
# <version> is optional
# example: relish push rspec/rspec-core
# example: relish push rspec/rspec-core:2.0
+ push:org <organization handle> # push markdown files to an organization
+ # example: relish push:org rspec
collab # list the collaborators for a project
collab:add <project>:<collaborator handle or email> # add a collaborator to a project
# example: relish collab:add rspec/rspec-core:justin
@@ -46,13 +48,13 @@ Feature: Help
# example: relish versions:add rspec/rspec-core:2.0
versions:remove <project>:<version> # remove a version from a project
# example: relish versions:remove rspec/rspec-core:2.0
-
+
"""
-
+
Scenario: Specifying no command runs the help command
When I successfully run "relish"
Then the output should contain "=== Available Commands"
-
+
Scenario: Specifying an unknown command gives an error message
When I run "relish baloney"
Then it should fail with:
View
11 spec/relish/commands/config_spec.rb
@@ -3,31 +3,30 @@
module Relish
module Command
describe Config do
-
-
+
describe '#default' do
let(:config) { described_class.new }
-
+
context 'with a local options file' do
before do
File.should_receive(:exists?).and_return(true)
IO.should_receive(:read).and_return('options')
end
-
+
it 'outputs the contents' do
config.should_receive(:puts).with('options')
config.default
end
end
-
+
context 'without a local options file' do
it 'outputs the correct message' do
config.should_receive(:puts).with('No .relish file exists')
config.default
end
end
end
-
+
end
end
end
View
18 spec/relish/commands/push_spec.rb
@@ -1,18 +0,0 @@
-require 'spec_helper'
-
-module Relish
- module Command
- describe Push do
-
- describe '#default' do
- let(:push) { described_class.new }
-
- it 'calls #post' do
- push.should_receive(:post)
- push.default
- end
- end
-
- end
- end
-end

0 comments on commit 74413e9

Please sign in to comment.