File: extension_steps.rb

package info (click to toggle)
ruby-compass 0.12.2~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,308 kB
  • sloc: ruby: 10,474; makefile: 42; xml: 14
file content (24 lines) | stat: -rw-r--r-- 801 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Given /^the "([^\"]*)" directory exists$/ do |directory|
  directory.gsub!('~', ENV["HOME"]) if directory.include?('~/')
  FileUtils.mkdir_p directory
end

Given /^and I have a fake extension at (.*)$/ do |directory|
  directory.gsub!('~', ENV["HOME"]) if directory.include?('~/')
  FileUtils.mkdir_p File.join(directory, 'stylesheets')
  FileUtils.mkdir_p File.join(directory, 'templates/project')
  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
end

Then /^the list of frameworks includes "([^\"]*)"$/ do |framework|
  @last_result.split("\n").map{|f| f.gsub(/(^\s+[*-]\s+)|(\s+$)/,'')}.should include(framework)
end