From 633bb24302fcdb735cf170185a73bf3a8da42b03 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 27 Nov 2010 16:48:36 -0800 Subject: [PATCH] Fix the broken validator tests --- features/command_line.feature | 2 +- features/step_definitions/command_line_steps.rb | 6 +++--- test/fixtures/stylesheets/valid/config.rb | 9 +++++++++ test/fixtures/stylesheets/valid/sass/simple.sass | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 test/fixtures/stylesheets/valid/config.rb create mode 100644 test/fixtures/stylesheets/valid/sass/simple.sass diff --git a/features/command_line.feature b/features/command_line.feature index e9a5ef3e..1deecefe 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -244,7 +244,7 @@ Feature: Command Line @validator Scenario: Validate the generated CSS - Given I am using the existing project in test/fixtures/stylesheets/compass + Given I am using the existing project in test/fixtures/stylesheets/valid When I run: compass validate Then my css is validated And I am informed that my css is valid. diff --git a/features/step_definitions/command_line_steps.rb b/features/step_definitions/command_line_steps.rb index 54d627cc..26bd9bd1 100644 --- a/features/step_definitions/command_line_steps.rb +++ b/features/step_definitions/command_line_steps.rb @@ -201,14 +201,14 @@ end Then /^my css is validated$/ do if @last_error =~ /The Compass CSS Validator could not be loaded/ - pending "Missing Dependency: sudo gem install chriseppstein-compass-validator" + pending "Missing Dependency: sudo gem install compass-validator" else - @last_result.should =~ /Compass CSS Validator/ + @last_result.should =~ /files? validated/ end end Then /^I am informed that my css is valid.$/ do - @last_result.should =~ /Your CSS files are valid\./ + @last_result.should =~ /Result: Valid/ end Then /^I am told statistics for each file:$/ do |table| diff --git a/test/fixtures/stylesheets/valid/config.rb b/test/fixtures/stylesheets/valid/config.rb new file mode 100644 index 00000000..bf580a54 --- /dev/null +++ b/test/fixtures/stylesheets/valid/config.rb @@ -0,0 +1,9 @@ +# Require any additional compass plugins here. +css_dir = "tmp" +sass_dir = "sass" +images_dir = "assets/images" +javascripts_dir = "assets/javascripts" +# Set this to the root of your project when deployed: +http_path = "/" +# To enable relative paths to assets via compass helper functions. Uncomment: +relative_assets = true diff --git a/test/fixtures/stylesheets/valid/sass/simple.sass b/test/fixtures/stylesheets/valid/sass/simple.sass new file mode 100644 index 00000000..30044bd3 --- /dev/null +++ b/test/fixtures/stylesheets/valid/sass/simple.sass @@ -0,0 +1,2 @@ +div + color: red \ No newline at end of file