Permalink
Browse files

Users can update their existing bourbon installation.

  • Loading branch information...
1 parent 04c9e21 commit bf34e70a257151a0eacba23af0460986229abb69 @gabebw gabebw committed Jan 20, 2012
View
@@ -4,3 +4,4 @@
bourbon/
demo/
tmp/
+tags
View
@@ -2,4 +2,4 @@
require "bourbon"
-Bourbon::Generator.new.generate
+Bourbon::Generator.new(ARGV).run
@@ -1,8 +1,7 @@
@disable-bundler
-Feature: Generate bourbon files via gem subcommand
+Feature: Generate bourbon files
Scenario: Run `bourbon generate`
- Given I set up bourbon
When I generate bourbon files
Then the sass directories should have been generated
And the following directories should exist:
@@ -3,12 +3,13 @@
generate_bourbon
end
-When /^I set up bourbon$/ do
+When /^I generate bourbon files$/ do
set_up_bourbon_directory
+ generate_bourbon
end
-When /^I generate bourbon files$/ do
- generate_bourbon
+When /^I update bourbon files$/ do
+ update_bourbon
end
Then /^the sass directories should have been generated$/ do
@@ -24,3 +25,7 @@
check_file_presence(["bourbon/lib/sass_extensions.rb"], true)
check_directory_presence(["bourbon/lib/sass_extensions"], true)
end
+
+Then /^bourbon should not have been generated$/ do
+ check_directory_presence(["bourbon"], false)
+end
@@ -7,6 +7,10 @@ def set_up_bourbon_directory
def generate_bourbon
run_simple("bundle exec bourbon generate")
end
+
+ def update_bourbon
+ run_simple("bundle exec bourbon update")
+ end
end
World(BourbonSupport)
View
@@ -0,0 +1,17 @@
+@disable-bundler
+Feature: Update bourbon files
+
+ Scenario: `bourbon update` updates an existing bourbon install
+ When I generate bourbon files
+ And I write to "bourbon/_bourbon.scss" with:
+ """
+ foobar
+ """
+ And I update bourbon files
+ Then the output should contain "Bourbon files updated."
+ And the file "bourbon/_bourbon.scss" should not contain "foobar"
+
+ Scenario: `bourbon update` does not generate a new bourbon install
+ When I update bourbon files
+ Then bourbon should not have been generated
+ And the output should contain "No existing bourbon installation. Doing nothing."

0 comments on commit bf34e70

Please sign in to comment.