{"action":"created","issue":{"url":"https://api.github.com/repos/intridea/grape/issues/930","labels_url":"https://api.github.com/repos/intridea/grape/issues/930/labels{/name}","comments_url":"https://api.github.com/repos/intridea/grape/issues/930/comments","events_url":"https://api.github.com/repos/intridea/grape/issues/930/events","html_url":"https://github.com/intridea/grape/pull/930","id":57990329,"number":930,"title":"Add test to reproduce bug with Warden test helper","user":{"login":"toddmazierski","id":544541,"avatar_url":"https://avatars.githubusercontent.com/u/544541?v=3","gravatar_id":"","url":"https://api.github.com/users/toddmazierski","html_url":"https://github.com/toddmazierski","followers_url":"https://api.github.com/users/toddmazierski/followers","following_url":"https://api.github.com/users/toddmazierski/following{/other_user}","gists_url":"https://api.github.com/users/toddmazierski/gists{/gist_id}","starred_url":"https://api.github.com/users/toddmazierski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddmazierski/subscriptions","organizations_url":"https://api.github.com/users/toddmazierski/orgs","repos_url":"https://api.github.com/users/toddmazierski/repos","events_url":"https://api.github.com/users/toddmazierski/events{/privacy}","received_events_url":"https://api.github.com/users/toddmazierski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/intridea/grape/labels/bug?","name":"bug?","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-17T22:10:18Z","updated_at":"2015-03-04T11:30:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/intridea/grape/pulls/930","html_url":"https://github.com/intridea/grape/pull/930","diff_url":"https://github.com/intridea/grape/pull/930.diff","patch_url":"https://github.com/intridea/grape/pull/930.patch"},"body":"When using the `login_as` Warden test helper, it depends whether or not the API class under test is evaluated *before* or *after* the tests.\r\n\r\nGiven that this bug first appeared in [v0.10.0](https://github.com/intridea/grape/releases/tag/v0.10.0), my current theory is the use of `deep_dup` is responsible. Warden persists registered hooks in [instance variables](http://git.io/NhKG). When an API class is evaluated *before* the tests, the hooks are registered *after* duplication takes place, so the original object is left with an empty array of hooks.\r\n\r\nAny help or suggestions are most appreciated. Thanks for this great library! :smile: "},"comment":{"url":"https://api.github.com/repos/intridea/grape/issues/comments/77142417","html_url":"https://github.com/intridea/grape/pull/930#issuecomment-77142417","issue_url":"https://api.github.com/repos/intridea/grape/issues/930","id":77142417,"user":{"login":"dblock","id":542335,"avatar_url":"https://avatars.githubusercontent.com/u/542335?v=3","gravatar_id":"","url":"https://api.github.com/users/dblock","html_url":"https://github.com/dblock","followers_url":"https://api.github.com/users/dblock/followers","following_url":"https://api.github.com/users/dblock/following{/other_user}","gists_url":"https://api.github.com/users/dblock/gists{/gist_id}","starred_url":"https://api.github.com/users/dblock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblock/subscriptions","organizations_url":"https://api.github.com/users/dblock/orgs","repos_url":"https://api.github.com/users/dblock/repos","events_url":"https://api.github.com/users/dblock/events{/privacy}","received_events_url":"https://api.github.com/users/dblock/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T11:30:56Z","updated_at":"2015-03-04T11:30:56Z","body":"@toddmazierski You should give my suggestion a try, I'll do my best to help."}}