diff --git a/features/command_line.feature b/features/command_line.feature index 2e36d081..931f8978 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -132,3 +132,15 @@ Feature: Command Line And a sass file sass/print.sass is reported unchanged And a sass file sass/reset.sass is reported unchanged And a sass file sass/utilities.sass is reported unchanged + + Scenario: Recompiling a project with changes + Given I am using the existing project in test/fixtures/stylesheets/compass + When I run: compass compile + And I wait 1 second + And I add some sass to sass/layout.sass + And I run: compass compile + Then a sass file sass/layout.sass is reported compiled + And a css file tmp/layout.css is reported overwritten + And a sass file sass/print.sass is reported unchanged + And a sass file sass/reset.sass is reported unchanged + And a sass file sass/utilities.sass is reported unchanged diff --git a/features/step_definitions/command_line_steps.rb b/features/step_definitions/command_line_steps.rb index 0c5d86f6..65e522ec 100644 --- a/features/step_definitions/command_line_steps.rb +++ b/features/step_definitions/command_line_steps.rb @@ -50,6 +50,13 @@ When /^I wait ([\d.]+) seconds?$/ do |count| sleep count.to_f end +When /^I add some sass to ([^\s]+)$/ do |filename| + open(filename, "w+") do |file| + file.puts ".added .some .arbitrary" + file.puts " sass: code" + end +end + # Then postconditions Then /^a directory ([^ ]+) is (not )?created$/ do |directory, negated| File.directory?(directory).should == !negated @@ -75,6 +82,10 @@ Then /a \w+ file ([^ ]+) is reported identical/ do |filename| @last_result.should =~ /identical #{Regexp.escape(filename)}/ end +Then /a \w+ file ([^ ]+) is reported overwritten/ do |filename| + @last_result.should =~ /overwrite #{Regexp.escape(filename)}/ +end + Then /I am told how to link to ([^ ]+) for media "([^"]+)"/ do |stylesheet, media| @last_result.should =~ %r{} end