This repository has been archived by the owner on Jun 8, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move pre-compilation task into its own feature.
This also removes a lot of nested Cucumber steps.
- Loading branch information
Gabe Berke-Williams
committed
Oct 22, 2011
1 parent
7ca5108
commit caeb62a
Showing
4 changed files
with
49 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@slow @creates-remote @disable-bundler | ||
Feature: Rake task that runs before asset compilation | ||
As a user | ||
I want a Rake task that runs before packaging | ||
So that I can hook into the packaging process | ||
|
||
Scenario: Custom task runs if Jammit is installed | ||
Given a new Rails application with Kumade and Jammit | ||
When I create a Heroku remote named "pretend-staging" | ||
And I add a pre-compilation rake task that prints "Hi!" | ||
And I run kumade with "pretend-staging" | ||
Then the output should contain "kumade:before_asset_compilation" | ||
And the output should contain "Hi!" | ||
|
||
Scenario: Custom task runs if Jammit is not installed | ||
Given a new Rails application with Kumade | ||
When I create a Heroku remote named "pretend-staging" | ||
And I add a pre-compilation rake task that prints "Hi!" | ||
And I run kumade with "pretend-staging" | ||
Then the output should contain "kumade:before_asset_compilation" | ||
And the output should contain "Hi!" | ||
|
||
Scenario: Pre-asset compilation task does not run when pretending | ||
Given a new Rails application with Kumade and Jammit | ||
When I create a Heroku remote named "pretend-staging" | ||
And I add a pre-compilation rake task that prints "Hi!" | ||
And I run kumade with "pretend-staging -p" | ||
Then the output should contain "kumade:before_asset_compilation" | ||
But the output should not contain "Hi!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
Given /^a new Rails application with Kumade$/ do | ||
run_simple("rails new rake-tasks -T") | ||
cd('rake-tasks') | ||
append_to_file('Gemfile', "gem 'kumade', :path => '#{PROJECT_PATH}'") | ||
run_bundler | ||
set_up_git_repo | ||
create_rails_app_with_kumade | ||
end | ||
|
||
Given /^a new Rails application with Kumade and Jammit$/ do | ||
Given "a new Rails application with Kumade" | ||
add_jammit_to_gemfile | ||
run_bundler | ||
set_up_git_repo | ||
create_rails_app_with_kumade_and_jammit | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module RailsAppHelpers | ||
def create_rails_app_with_kumade | ||
run_simple("rails new rake-tasks -T") | ||
cd('rake-tasks') | ||
append_to_file('Gemfile', "gem 'kumade', :path => '#{PROJECT_PATH}'") | ||
run_bundler | ||
set_up_git_repo | ||
end | ||
|
||
def create_rails_app_with_kumade_and_jammit | ||
create_rails_app_with_kumade | ||
add_jammit_to_gemfile | ||
run_bundler | ||
commit_everything_in_repo | ||
end | ||
end | ||
|
||
World(RailsAppHelpers) |