From b96789ce5b84d00657c1b6d46ee4183e76df46ca Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Thu, 17 Nov 2011 18:40:42 -0500 Subject: [PATCH] fixed cucumber features --- Gemfile.lock | 2 +- features/extensions.feature | 9 +++++---- features/step_definitions/extension_steps.rb | 2 ++ lib/compass.rb | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a23ad19a..d7be551d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - compass (0.12.alpha.1.7d2d537) + compass (0.12.alpha.1.b2f420d) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) diff --git a/features/extensions.feature b/features/extensions.feature index 89b3857c..1f1a979c 100644 --- a/features/extensions.feature +++ b/features/extensions.feature @@ -16,16 +16,17 @@ Feature: Extensions Scenario: Extensions directory for rails projects Given ruby supports fork And I'm in a newly created rails project: my_rails_project - And the "my_rails_project/vendor/plugins/compass/extensions" directory exists - And and I have a fake extension at my_rails_project/vendor/plugins/compass/extensions/testing + And I run: compass init rails + And the "vendor/plugins/compass_extensions" directory exists + And and I have a fake extension at vendor/plugins/compass_extensions/testing When I run: compass frameworks Then the list of frameworks includes "testing" @listframeworks Scenario: Shared extensions directory - Given I am using the existing project in test/fixtures/stylesheets/compass - And the "~/.compass/extensions" directory exists + Given the "~/.compass/extensions" directory exists And and I have a fake extension at ~/.compass/extensions/testing + And I am using the existing project in test/fixtures/stylesheets/compass When I run: compass frameworks Then the list of frameworks includes "testing" diff --git a/features/step_definitions/extension_steps.rb b/features/step_definitions/extension_steps.rb index 2423e482..dcf4ca50 100644 --- a/features/step_definitions/extension_steps.rb +++ b/features/step_definitions/extension_steps.rb @@ -1,8 +1,10 @@ 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| diff --git a/lib/compass.rb b/lib/compass.rb index 2d097fcb..081b0538 100644 --- a/lib/compass.rb +++ b/lib/compass.rb @@ -17,7 +17,7 @@ module Compass def shared_extension_paths @shared_extension_paths ||= begin if ENV["HOME"] && File.directory?(ENV["HOME"]) - [File.expand_path("~/.compass/extensions")] + [File.join(ENV["HOME"], ".compass", "extensions")] else [] end