Scenario for recompiling after changes.

This commit is contained in:
Chris Eppstein 2009-10-24 17:53:02 -07:00
parent 61264714bd
commit 58cc6c0aab
2 changed files with 23 additions and 0 deletions

View File

@ -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

View File

@ -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{<link href="#{stylesheet}" media="#{media}" rel="stylesheet" type="text/css" />}
end