{"action":"created","issue":{"url":"https://api.github.com/repos/mojotech/capybara-ui/issues/156","repository_url":"https://api.github.com/repos/mojotech/capybara-ui","labels_url":"https://api.github.com/repos/mojotech/capybara-ui/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/mojotech/capybara-ui/issues/156/comments","events_url":"https://api.github.com/repos/mojotech/capybara-ui/issues/156/events","html_url":"https://github.com/mojotech/capybara-ui/issues/156","id":150585677,"number":156,"title":"#eventually doesn't work if rspec is loaded after capybara-ui in the Gemfile","user":{"login":"shoe","id":3534,"avatar_url":"https://avatars.githubusercontent.com/u/3534?v=3","gravatar_id":"","url":"https://api.github.com/users/shoe","html_url":"https://github.com/shoe","followers_url":"https://api.github.com/users/shoe/followers","following_url":"https://api.github.com/users/shoe/following{/other_user}","gists_url":"https://api.github.com/users/shoe/gists{/gist_id}","starred_url":"https://api.github.com/users/shoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoe/subscriptions","organizations_url":"https://api.github.com/users/shoe/orgs","repos_url":"https://api.github.com/users/shoe/repos","events_url":"https://api.github.com/users/shoe/events{/privacy}","received_events_url":"https://api.github.com/users/shoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-23T19:07:00Z","updated_at":"2016-04-23T19:55:39Z","closed_at":null,"body":"We check for `defined?(RSpec)` in order to know whether or not to add RSpec's `ExpectationNotMet` exception to our list of exceptions to rescue inside an `eventually` block.  But, if RSpec hasn't been loaded yet, then we don't find it, and we don't ever try to rescue that exception.  Therefore, the `eventually` block just errors out the first time.\r\n\r\nA solution might be to check for RSpec each time `eventually` is called. "},"comment":{"url":"https://api.github.com/repos/mojotech/capybara-ui/issues/comments/213819541","html_url":"https://github.com/mojotech/capybara-ui/issues/156#issuecomment-213819541","issue_url":"https://api.github.com/repos/mojotech/capybara-ui/issues/156","id":213819541,"user":{"login":"cpjolicoeur","id":863,"avatar_url":"https://avatars.githubusercontent.com/u/863?v=3","gravatar_id":"","url":"https://api.github.com/users/cpjolicoeur","html_url":"https://github.com/cpjolicoeur","followers_url":"https://api.github.com/users/cpjolicoeur/followers","following_url":"https://api.github.com/users/cpjolicoeur/following{/other_user}","gists_url":"https://api.github.com/users/cpjolicoeur/gists{/gist_id}","starred_url":"https://api.github.com/users/cpjolicoeur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpjolicoeur/subscriptions","organizations_url":"https://api.github.com/users/cpjolicoeur/orgs","repos_url":"https://api.github.com/users/cpjolicoeur/repos","events_url":"https://api.github.com/users/cpjolicoeur/events{/privacy}","received_events_url":"https://api.github.com/users/cpjolicoeur/received_events","type":"User","site_admin":false},"created_at":"2016-04-23T19:55:39Z","updated_at":"2016-04-23T19:55:39Z","body":"I'm actually already working on this.  Came across it on UW211. \r\n\r\nTalked with @david and I think a solution is to just have users manually require something like \r\n\r\n```ruby\r\nrequire 'capybara/ui/rspec\r\n```\r\n\r\non projects that they want RSpec support on.\r\n\r\nI've started a branch already (yesterday actually) to start this"}}