Guest User

Untitled

a guest
Jan 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.53 KB | None | 0 0
  1. (tapajos:kumade (master))$ ruby -v
  2. ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.2.0]
  3. (tapajos:kumade (master))$ rake cucumber
  4. /Users/tapajos/.rvm/rubies/ruby-1.8.7-p352/bin/ruby -S bundle exec cucumber
  5. @extra-timeout @creates-remote @disable-bundler
  6. Feature: Kumade executable
  7. As a user
  8. I want to be able to use the kumade executable
  9. So I can have a better experience than Rake provides
  10.  
  11. Background: # features/kumade_executable.feature:7
  12. Given a directory named "executable" # aruba-0.4.6/lib/aruba/cucumber.rb:11
  13. And I cd to "executable" # aruba-0.4.6/lib/aruba/cucumber.rb:43
  14. And I set up the Gemfile with kumade # features/step_definitions/bundler_steps.rb:16
  15. And I add "jammit" to the Gemfile # features/step_definitions/bundler_steps.rb:25
  16. And I bundle # features/step_definitions/bundler_steps.rb:1
  17. When I set up a git repo # features/step_definitions/git_steps.rb:9
  18. And I create a Heroku remote for "pretend-staging-app" named "pretend-staging" # features/step_definitions/git_steps.rb:1
  19. And I create a Heroku remote for "app-two" named "staging" # features/step_definitions/git_steps.rb:1
  20. And I create a non-Heroku remote named "bad-remote" # features/step_definitions/git_steps.rb:5
  21.  
  22. Scenario: Pretend mode with a Heroku remote # features/kumade_executable.feature:18
  23. When I run kumade with "pretend-staging -p" # features/step_definitions/kumade_steps.rb:1
  24. Then the output should contain "In Pretend Mode" # aruba-0.4.6/lib/aruba/cucumber.rb:78
  25. And the output should contain: # aruba-0.4.6/lib/aruba/cucumber.rb:94
  26. """
  27. ==> Git repo is clean
  28. ==> Packaged assets with Jammit
  29. run git push origin master
  30. ==> Pushed master -> origin
  31. run git branch deploy
  32. run git push -f pretend-staging deploy:master
  33. ==> Pushed deploy:master -> pretend-staging
  34. ==> Migrated pretend-staging
  35. run git checkout master && git branch -D deploy
  36. ==> Deployed to: pretend-staging
  37. """
  38. But the output should not contain "==> Packaged assets with More" # aruba-0.4.6/lib/aruba/cucumber.rb:90
  39.  
  40. Scenario: Default environment is staging # features/kumade_executable.feature:36
  41. When I run kumade with "-p" # features/step_definitions/kumade_steps.rb:1
  42. Then the output should contain "==> Deployed to: staging" # aruba-0.4.6/lib/aruba/cucumber.rb:78
  43.  
  44. Scenario: Can deploy to arbitrary environment # features/kumade_executable.feature:40
  45. When I run kumade with "bamboo" # features/step_definitions/kumade_steps.rb:1
  46. Then the output should contain "==> Deploying to: bamboo" # aruba-0.4.6/lib/aruba/cucumber.rb:78
  47. And the output should match /Cannot deploy: / # aruba-0.4.6/lib/aruba/cucumber.rb:114
  48.  
  49. Scenario: Deploying to a non-Heroku remote fails # features/kumade_executable.feature:45
  50. When I run kumade with "bad-remote" # features/step_definitions/kumade_steps.rb:1
  51. Then the output should match /==> ! Cannot deploy: "bad-remote" remote does not point to Heroku/ # aruba-0.4.6/lib/aruba/cucumber.rb:114
  52.  
  53. Scenario: Deploy from another branch # features/kumade_executable.feature:49
  54. When I run `git checkout -b new_branch` # aruba-0.4.6/lib/aruba/cucumber.rb:52
  55. And I run kumade with "pretend-staging -p" # features/step_definitions/kumade_steps.rb:1
  56. Then the output should contain: # aruba-0.4.6/lib/aruba/cucumber.rb:94
  57. """
  58. ==> Git repo is clean
  59. ==> Packaged assets with Jammit
  60. run git push origin new_branch
  61. ==> Pushed new_branch -> origin
  62. run git branch deploy
  63. run git push -f pretend-staging deploy:master
  64. ==> Pushed deploy:master -> pretend-staging
  65. ==> Migrated pretend-staging
  66. run git checkout new_branch && git branch -D deploy
  67. ==> Deployed to: pretend-staging
  68. """
  69.  
  70. Scenario: Git is clean if there are untracked files # features/kumade_executable.feature:66
  71. Given I write to "new-file" with: # aruba-0.4.6/lib/aruba/cucumber.rb:23
  72. """
  73. clean
  74. """
  75. When I run kumade with "pretend-staging" # features/step_definitions/kumade_steps.rb:1
  76. Then the output from "bundle exec kumade pretend-staging" should not contain "==> ! Cannot deploy: repo is not clean" # aruba-0.4.6/lib/aruba/cucumber.rb:86
  77.  
  78. Scenario: Git is not clean if a tracked file is modified # features/kumade_executable.feature:74
  79. Given I write to "new-file" with: # aruba-0.4.6/lib/aruba/cucumber.rb:23
  80. """
  81. clean
  82. """
  83. And I commit everything in the current repo # features/step_definitions/git_steps.rb:18
  84. When I append to "new-file" with "dirty it up" # aruba-0.4.6/lib/aruba/cucumber.rb:35
  85. And I run kumade with "pretend-staging" # features/step_definitions/kumade_steps.rb:1
  86. Then the output from "bundle exec kumade pretend-staging" should contain "==> ! Cannot deploy: repo is not clean" # aruba-0.4.6/lib/aruba/cucumber.rb:82
  87.  
  88. Scenario: Jammit packager runs if Jammit is installed # features/kumade_executable.feature:84
  89. When I run kumade with "pretend-staging" # features/step_definitions/kumade_steps.rb:1
  90. Then the output from "bundle exec kumade pretend-staging" should contain "==> ! Error: Jammit::MissingConfiguration" # aruba-0.4.6/lib/aruba/cucumber.rb:82
  91.  
  92. Scenario: Run custom task before jammit # features/kumade_executable.feature:88
  93. Given I write to "Rakefile" with: # aruba-0.4.6/lib/aruba/cucumber.rb:23
  94. """
  95. namespace :kumade do
  96. task :before_asset_compilation do
  97. puts 'Hi!'
  98. end
  99. end
  100. """
  101. When I run kumade with "pretend-staging -p" # features/step_definitions/kumade_steps.rb:1
  102. Then the output should match /kumade:before_asset_compilation.*Packaged assets with Jammit/ # aruba-0.4.6/lib/aruba/cucumber.rb:114
  103.  
  104. @extra-timeout @creates-remote @disable-bundler
  105. Feature: Kumade without jammit
  106.  
  107. Background: # features/kumade_without_jammit.feature:4
  108. Given a directory named "executable" # aruba-0.4.6/lib/aruba/cucumber.rb:11
  109. And I cd to "executable" # aruba-0.4.6/lib/aruba/cucumber.rb:43
  110. And I set up the Gemfile with kumade # features/step_definitions/bundler_steps.rb:16
  111. And I bundle # features/step_definitions/bundler_steps.rb:1
  112. When I set up a git repo # features/step_definitions/git_steps.rb:9
  113. And I create a Heroku remote for "pretend-staging-app" named "pretend-staging" # features/step_definitions/git_steps.rb:1
  114.  
  115. Scenario: Jammit packager does not run if Jammit is not installed # features/kumade_without_jammit.feature:12
  116. When I run kumade with "pretend-staging" # features/step_definitions/kumade_steps.rb:1
  117. Then the output should not contain "==> ! Error: Jammit::MissingConfiguration" # aruba-0.4.6/lib/aruba/cucumber.rb:90
  118.  
  119. Scenario: Run custom task if it exists # features/kumade_without_jammit.feature:16
  120. Given I write to "Rakefile" with: # aruba-0.4.6/lib/aruba/cucumber.rb:23
  121. """
  122. namespace :kumade do
  123. task :before_asset_compilation do
  124. puts 'Hi!'
  125. end
  126. end
  127. """
  128. When I run kumade with "pretend-staging" # features/step_definitions/kumade_steps.rb:1
  129. Then the output should contain "Running kumade:before_asset_compilation task" # aruba-0.4.6/lib/aruba/cucumber.rb:78
  130. And the output should contain "Hi!" # aruba-0.4.6/lib/aruba/cucumber.rb:78
  131.  
  132. Scenario: Don't run rake task in pretend mode # features/kumade_without_jammit.feature:29
  133. Given I write to "Rakefile" with: # aruba-0.4.6/lib/aruba/cucumber.rb:23
  134. """
  135. namespace :kumade do
  136. task :before_asset_compilation do
  137. puts 'Hi!'
  138. end
  139. end
  140. """
  141. When I run kumade with "pretend-staging -p" # features/step_definitions/kumade_steps.rb:1
  142. Then the output should contain "Running kumade:before_asset_compilation task" # aruba-0.4.6/lib/aruba/cucumber.rb:78
  143. And the output should not contain "Hi!" # aruba-0.4.6/lib/aruba/cucumber.rb:90
  144.  
  145. 12 scenarios (12 passed)
  146. 136 steps (136 passed)
  147. 0m25.388s
  148. (tapajos:kumade (master))$
Add Comment
Please, Sign In to add comment