test 3rd party commands

This commit is contained in:
Thomas Reynolds 2011-12-21 11:11:38 -08:00
parent 20ae42dcc0
commit 21388f2103
3 changed files with 16 additions and 0 deletions

View file

@ -15,6 +15,7 @@
* Update to Redcarpet for Markdown (breaks Haml :markdown filter)
* Return correct exit codes (0 for success, 1 for failure) from CLI
* Yard code docs: http://rubydoc.info/github/tdreyno/middleman
* config.rb and extensions can add command-line commands
2.0.14
====

View file

@ -0,0 +1,5 @@
Feature: Allow config.rb and extensions to add CLI commands
Scenario: Test 3rd Party Command
Given a fixture app "3rd-party-command"
When I run `middleman hello`
Then the output should contain "Hello World"

View file

@ -0,0 +1,10 @@
class HelloWorld < Thor
default_task :say_hi
desc "hello", "Say hello"
def say_hi
puts "Hello World"
end
end
Middleman::CLI::Base.register(HelloWorld, :hello, "hello", "Say hello")