Skip to content

Commit

Permalink
Clean up cucumber feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams and Phil LaPier authored and Gabe Berke-Williams committed Jan 20, 2012
1 parent 0428c04 commit 89a1e19
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
21 changes: 6 additions & 15 deletions features/generate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@ Feature: Generate bourbon files via gem subcommand

@disable-bundler
Scenario: Run `bourbon generate`
Given a directory named "test"
When I cd to "test"
And I set up bourbon
And I run `bundle exec bourbon generate`
Then the following directories should exist:
Given I set up bourbon
When I generate bourbon files
Then the sass directories should have been generated
And the following directories should exist:
| bourbon |
| bourbon/lib |
| bourbon/addons |
| bourbon/css3 |
| bourbon/functions |
And a file named "bourbon/_bourbon.scss" should exist
And a file named "bourbon/lib/sass_extensions.rb" should exist
And a directory named "bourbon/lib/sass_extensions" should exist
But a directory named "bourbon/lib/tasks" should not exist
And the following files should not exist:
| bourbon/lib/bourbon/engine.rb |
| bourbon/lib/bourbon/version.rb |
And the master bourbon partial should have been generated
And the lib files should have been generated
18 changes: 18 additions & 0 deletions features/step_definitions/bourbon_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,21 @@
write_file("Gemfile", "gem 'bourbon', :path => '../../..'")
run_simple("bundle install")
end

When /^I generate bourbon files$/ do
run_simple("bundle exec bourbon generate")
end

Then /^the sass directories should have been generated$/ do
sass_directories = ["bourbon/addons", "bourbon/css3", "bourbon/functions"]
check_directory_presence(sass_directories, true)
end

Then /^the master bourbon partial should have been generated$/ do
check_file_presence(["bourbon/_bourbon.scss"], true)
end

Then /^the lib files should have been generated$/ do
check_file_presence(["bourbon/lib/sass_extensions.rb"], true)
check_directory_presence(["bourbon/lib/sass_extensions"], true)
end

0 comments on commit 89a1e19

Please sign in to comment.