Permalink
Browse files

Assign better values to the Capistrano variable values used in Cucumb…

…er features
  • Loading branch information...
1 parent 8c40f9c commit 4669388713b53b824b30330ff40efe1ec1410ba0 @njonsson committed Mar 6, 2013
@@ -24,7 +24,7 @@ Feature: The #mirror_rake_tasks DSL method, inside a Capistrano namespace
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
namespace :ns do
Cape do |cape|
@@ -36,5 +36,5 @@ Feature: The #mirror_rake_tasks DSL method, inside a Capistrano namespace
Then the output should contain:
"""
* executing `ns:with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
"""
@@ -77,7 +77,7 @@ Feature: The #mirror_rake_tasks DSL method
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks
@@ -87,7 +87,7 @@ Feature: The #mirror_rake_tasks DSL method
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
`with_period' is only run for servers matching {}, but no servers matched
"""
@@ -175,7 +175,7 @@ Feature: The #mirror_rake_tasks DSL method
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks
@@ -185,7 +185,7 @@ Feature: The #mirror_rake_tasks DSL method
Then the output should contain:
"""
* executing `my_namespace'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace"
`my_namespace' is only run for servers matching {}, but no servers matched
"""
@@ -231,7 +231,7 @@ Feature: The #mirror_rake_tasks DSL method
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks
@@ -241,7 +241,7 @@ Feature: The #mirror_rake_tasks DSL method
Then the output should contain:
"""
* executing `my_namespace:my_nested_namespace:in_a_nested_namespace'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace:my_nested_namespace:in_a_nested_namespace"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace:my_nested_namespace:in_a_nested_namespace"
`my_namespace:my_nested_namespace:in_a_nested_namespace' is only run for servers matching {}, but no servers matched
"""
@@ -293,7 +293,7 @@ Feature: The #mirror_rake_tasks DSL method
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks
@@ -303,15 +303,15 @@ Feature: The #mirror_rake_tasks DSL method
Then the output should contain:
"""
* executing `with_three_args'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_three_args[\"a value for an_arg1\",\"a value for an_arg2\",\"a value for an_arg3\"]"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_three_args[\"a value for an_arg1\",\"a value for an_arg2\",\"a value for an_arg3\"]"
`with_three_args' is only run for servers matching {}, but no servers matched
"""
Scenario: mirror Rake task 'with_three_args' with its implementation not enforcing arguments
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks
@@ -321,6 +321,6 @@ Feature: The #mirror_rake_tasks DSL method
Then the output should contain:
"""
* executing `with_three_args'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_three_args[,\"a value for an_arg2\",]"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_three_args[,\"a value for an_arg2\",]"
`with_three_args' is only run for servers matching {}, but no servers matched
"""
@@ -31,7 +31,7 @@ Feature: The #mirror_rake_tasks DSL method with a defined namespace
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks 'my_namespace'
@@ -41,15 +41,15 @@ Feature: The #mirror_rake_tasks DSL method with a defined namespace
Then the output should contain:
"""
* executing `my_namespace'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace"
`my_namespace' is only run for servers matching {}, but no servers matched
"""
Scenario: mirror a Rake task in the matching namespace with its implementation
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks :my_namespace
@@ -59,6 +59,6 @@ Feature: The #mirror_rake_tasks DSL method with a defined namespace
Then the output should contain:
"""
* executing `my_namespace:my_nested_namespace:in_a_nested_namespace'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace:my_nested_namespace:in_a_nested_namespace"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake my_namespace:my_nested_namespace:in_a_nested_namespace"
`my_namespace:my_nested_namespace:in_a_nested_namespace' is only run for servers matching {}, but no servers matched
"""
@@ -24,7 +24,7 @@ Feature: The #mirror_rake_tasks DSL method with a defined task
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks 'with_period'
@@ -34,6 +34,6 @@ Feature: The #mirror_rake_tasks DSL method with a defined task
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
`with_period' is only run for servers matching {}, but no servers matched
"""
@@ -26,8 +26,8 @@ Feature: The #mirror_rake_tasks DSL method with a defined task and environment v
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
- set :rails_env, 'production'
+ set :current_path, '/current/path'
+ set :rails_env, 'rails-env'
Cape do
mirror_rake_tasks 'with_period' do |env|
@@ -39,6 +39,6 @@ Feature: The #mirror_rake_tasks DSL method with a defined task and environment v
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"production\""
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"rails-env\""
`with_period' is only run for servers matching {}, but no servers matched
"""
@@ -24,7 +24,7 @@ Feature: The #mirror_rake_tasks DSL method a defined task, valid options
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks 'with_period', :roles => :app
@@ -34,6 +34,6 @@ Feature: The #mirror_rake_tasks DSL method a defined task, valid options
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
`with_period' is only run for servers matching {:roles=>:app}, but no servers matched
"""
@@ -26,8 +26,8 @@ Feature: The #mirror_rake_tasks DSL method with a defined task, valid options, a
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
- set :rails_env, 'production'
+ set :current_path, '/current/path'
+ set :rails_env, 'rails-env'
Cape do
mirror_rake_tasks 'with_period', :roles => :app do |env|
@@ -39,6 +39,6 @@ Feature: The #mirror_rake_tasks DSL method with a defined task, valid options, a
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"production\""
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"rails-env\""
`with_period' is only run for servers matching {:roles=>:app}, but no servers matched
"""
@@ -8,8 +8,8 @@ Feature: The #mirror_rake_tasks DSL method with environment variables
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
- set :rails_env, 'production'
+ set :current_path, '/current/path'
+ set :rails_env, 'rails-env'
Cape do
mirror_rake_tasks do |env|
@@ -24,6 +24,6 @@ Feature: The #mirror_rake_tasks DSL method with environment variables
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"production\" SOME_OTHER=\"var\""
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"rails-env\" SOME_OTHER=\"var\""
`with_period' is only run for servers matching {}, but no servers matched
"""
@@ -8,7 +8,7 @@ Feature: The #mirror_rake_tasks DSL method with valid options
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape do
mirror_rake_tasks :roles => :app
@@ -18,6 +18,6 @@ Feature: The #mirror_rake_tasks DSL method with valid options
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
`with_period' is only run for servers matching {:roles=>:app}, but no servers matched
"""
@@ -8,8 +8,8 @@ Feature: The #mirror_rake_tasks DSL method with valid options and environment va
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
- set :rails_env, 'production'
+ set :current_path, '/current/path'
+ set :rails_env, 'rails-env'
Cape do
mirror_rake_tasks :roles => :app do |env|
@@ -21,6 +21,6 @@ Feature: The #mirror_rake_tasks DSL method with valid options and environment va
Then the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"production\""
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"rails-env\""
`with_period' is only run for servers matching {:roles=>:app}, but no servers matched
"""
@@ -44,7 +44,7 @@ Feature: The #local_rake_executable and #remote_rake_executable DSL attributes
Given a full-featured Rakefile
And a Capfile with:
"""
- set :current_path, '/path/to/current/deployed/application'
+ set :current_path, '/current/path'
Cape.remote_rake_executable = 'echo "This comes from overridden Rake" #'
@@ -66,5 +66,5 @@ Feature: The #local_rake_executable and #remote_rake_executable DSL attributes
And the output should contain:
"""
* executing `with_period'
- * executing "cd /path/to/current/deployed/application && echo \"This comes from overridden Rake\" # with_period"
+ * executing "cd /current/path && echo \"This comes from overridden Rake\" # with_period"
"""

0 comments on commit 4669388

Please sign in to comment.