2011-12-21 11:11:38 -08:00
|
|
|
Feature: Allow config.rb and extensions to add CLI commands
|
2012-04-16 15:38:26 -07:00
|
|
|
|
|
|
|
Scenario: Command autoloaded from tasks/ directory
|
|
|
|
Given an empty app
|
|
|
|
And a file named "tasks/hello_task.rb" with:
|
|
|
|
"""
|
|
|
|
class Hello < Thor
|
|
|
|
desc "hello", "Say hello"
|
|
|
|
def hello
|
|
|
|
puts "Hello World"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
"""
|
2011-12-21 11:11:38 -08:00
|
|
|
When I run `middleman hello`
|
|
|
|
Then the output should contain "Hello World"
|