{"action":"created","issue":{"url":"https://api.github.com/repos/calabash/calabash-android/issues/597","labels_url":"https://api.github.com/repos/calabash/calabash-android/issues/597/labels{/name}","comments_url":"https://api.github.com/repos/calabash/calabash-android/issues/597/comments","events_url":"https://api.github.com/repos/calabash/calabash-android/issues/597/events","html_url":"https://github.com/calabash/calabash-android/issues/597","id":92271980,"number":597,"title":"Formatter affects success of test cases","user":{"login":"Maxiplexi","id":10521587,"avatar_url":"https://avatars.githubusercontent.com/u/10521587?v=3","gravatar_id":"","url":"https://api.github.com/users/Maxiplexi","html_url":"https://github.com/Maxiplexi","followers_url":"https://api.github.com/users/Maxiplexi/followers","following_url":"https://api.github.com/users/Maxiplexi/following{/other_user}","gists_url":"https://api.github.com/users/Maxiplexi/gists{/gist_id}","starred_url":"https://api.github.com/users/Maxiplexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maxiplexi/subscriptions","organizations_url":"https://api.github.com/users/Maxiplexi/orgs","repos_url":"https://api.github.com/users/Maxiplexi/repos","events_url":"https://api.github.com/users/Maxiplexi/events{/privacy}","received_events_url":"https://api.github.com/users/Maxiplexi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-01T05:17:42Z","updated_at":"2015-07-09T01:51:21Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using **calabash-android 0.5.12** on **ruby 2.2.0**.\r\n\r\nI have a feature file that looks like this:\r\n\r\n```gherkin\r\nFeature: Login feature\r\n\r\n  Background:\r\n    Given I am on the Login page\r\n\r\n  Scenario: Successful login\r\n    When I enter valid credentials\r\n    Then I should be able to login successfully\r\n\r\n  Scenario Outline: Cannot login with password less the 2 characters\r\n    When I enter a <password> that is less than 2 characters long\r\n    Then I should not be able to login\r\n\r\n    Examples:\r\n    |password|\r\n    |a       |\r\n    |b       |\r\n```\r\n\r\nThe Background step calls `@current_page = page.await(LoginPage)` and then the steps in the scenarios call methods specific to @current_page (instance variable used here to illustrate).\r\n\r\nThis all works perfectly when using the `--format 'Slowhandcuke::Formatter'` option. However, the first example of the Scenario Outline always fails when some other formatter such as `--format pretty` or `--format 'Cucumber::Formatter::Html'` is used.\r\n\r\nThe error is that the background step is not executed completely, so `@current_page.class` is NilClass when the first example is executed, but it is successfully set to LoginPage by the time the second example is executed. This only occurs for Scenario Outlines. When I replace this with multiple Scenarios, they all run without a hitch.\r\n\r\nCould we please look into this issue further? Or, if anyone has advice on how to get around this problem, please let me know.\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/calabash/calabash-android/issues/comments/119780734","html_url":"https://github.com/calabash/calabash-android/issues/597#issuecomment-119780734","issue_url":"https://api.github.com/repos/calabash/calabash-android/issues/597","id":119780734,"user":{"login":"bret","id":23461,"avatar_url":"https://avatars.githubusercontent.com/u/23461?v=3","gravatar_id":"","url":"https://api.github.com/users/bret","html_url":"https://github.com/bret","followers_url":"https://api.github.com/users/bret/followers","following_url":"https://api.github.com/users/bret/following{/other_user}","gists_url":"https://api.github.com/users/bret/gists{/gist_id}","starred_url":"https://api.github.com/users/bret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bret/subscriptions","organizations_url":"https://api.github.com/users/bret/orgs","repos_url":"https://api.github.com/users/bret/repos","events_url":"https://api.github.com/users/bret/events{/privacy}","received_events_url":"https://api.github.com/users/bret/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T01:51:21Z","updated_at":"2015-07-09T01:51:21Z","body":"From your description, this seems like it would be an issue with cucumber and its formatters and not really related to Calabash. Can you reproduce the issue (not calling the background step) using just Cucumber?"}}