Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update order of After hooks #69

Merged
merged 3 commits into from
Sep 17, 2014
Merged

Conversation

erran
Copy link
Contributor

@erran erran commented Sep 17, 2014

  • Validate that Cucumber::Core::Test::Mapper returns adds after hooks in
    reverse order. See After hooks should be run in reverse order #64.
  • Use #unshift instead of #<< to add new after hooks
    • Array#unshift prepends vs. Array#<< which appends

Validate that Cucumber::Core::Test::Mapper returns adds after hooks in
reverse order. See cucumber#64.
@erran
Copy link
Contributor Author

erran commented Sep 17, 2014

@mattwynne @brasmusson Pointing to my changes in my Gemfile causes After hooks work again in my test suite. The failures I was experiencing related to some of my hooks cleaning up while another was logging out an API client. I figured changing the root cause vs. the order I declared the hooks would be more useful.

Gemfile changes

ecarey@aus-mac-1033 ~/r/i/c/automation (cucumber-2.0)> git diff Gemfile
diff --git a/Gemfile b/Gemfile
index 603ef26..57936d2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -31,6 +31,7 @@ group :reporting do
 end

 group :test do
+  gem 'cucumber-core', github: 'erran/cucumber-ruby-core', branch: 'after-hook-order'
   gem 'cucumber', '~> 2.0.0.beta.2'
   gem 'rspec'

Fix cucumber#64 by using `Array#unshift` which prepends vs. `Array#<<` which
appends.
mattwynne added a commit that referenced this pull request Sep 17, 2014
@mattwynne mattwynne merged commit ba46d1c into cucumber:master Sep 17, 2014
@erran erran deleted the after-hook-order branch September 18, 2014 03:53
@lock
Copy link

lock bot commented Oct 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants