2009-11-19 07:44:30 +00:00
|
|
|
Given /^the "([^\"]*)" directory exists$/ do |directory|
|
|
|
|
FileUtils.mkdir_p directory
|
|
|
|
end
|
|
|
|
|
|
|
|
Given /^and I have a fake extension at (.*)$/ do |directory|
|
|
|
|
FileUtils.mkdir_p File.join(directory, 'stylesheets')
|
|
|
|
FileUtils.mkdir_p File.join(directory, 'templates/project')
|
2010-05-30 19:37:12 +00:00
|
|
|
open(File.join(directory, 'templates/project/manifest.rb'),"w") do |f|
|
|
|
|
f.puts %Q{
|
|
|
|
description "This is a fake extension"
|
|
|
|
|
|
|
|
help "this is the fake help"
|
|
|
|
|
|
|
|
welcome_message "this is a fake welcome"
|
|
|
|
}
|
|
|
|
end
|
2009-11-19 07:44:30 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
Then /^the list of frameworks includes "([^\"]*)"$/ do |framework|
|
2010-05-30 19:37:12 +00:00
|
|
|
@last_result.split("\n").map{|f| f.gsub(/(^\s+[*-]\s+)|(\s+$)/,'')}.should include(framework)
|
2009-11-19 07:44:30 +00:00
|
|
|
end
|
|
|
|
|