Move 3rd party CLI out of fixtures
This commit is contained in:
parent
a91bcc8a4c
commit
bd9814965e
|
@ -1,5 +1,15 @@
|
||||||
Feature: Allow config.rb and extensions to add CLI commands
|
Feature: Allow config.rb and extensions to add CLI commands
|
||||||
Scenario: Test 3rd Party Command
|
|
||||||
Given a fixture app "3rd-party-command"
|
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
|
||||||
|
"""
|
||||||
When I run `middleman hello`
|
When I run `middleman hello`
|
||||||
Then the output should contain "Hello World"
|
Then the output should contain "Hello World"
|
|
@ -1,6 +0,0 @@
|
||||||
class Hello < Thor
|
|
||||||
desc "hello", "Say hello"
|
|
||||||
def hello
|
|
||||||
puts "Hello World"
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -7,6 +7,11 @@ Given /^app "([^\"]*)" is using config "([^\"]*)"$/ do |path, config_name|
|
||||||
FileUtils.cp(config_path, config_dest)
|
FileUtils.cp(config_path, config_dest)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Given /^an empty app$/ do
|
||||||
|
step %Q{a directory named "empty_app"}
|
||||||
|
step %Q{I cd to "empty_app"}
|
||||||
|
end
|
||||||
|
|
||||||
Given /^a fixture app "([^\"]*)"$/ do |path|
|
Given /^a fixture app "([^\"]*)"$/ do |path|
|
||||||
# This step can be reentered from several places but we don't want
|
# This step can be reentered from several places but we don't want
|
||||||
# to keep re-copying and re-cd-ing into ever-deeper directories
|
# to keep re-copying and re-cd-ing into ever-deeper directories
|
||||||
|
|
Loading…
Reference in a new issue