test 3rd party commands
This commit is contained in:
parent
20ae42dcc0
commit
21388f2103
3 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
====
|
||||
|
|
5
features/3rd_party_cli.feature
Normal file
5
features/3rd_party_cli.feature
Normal 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"
|
10
fixtures/3rd-party-command/config.rb
Normal file
10
fixtures/3rd-party-command/config.rb
Normal 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")
|
Loading…
Reference in a new issue