{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/smart-answers/issues/2532","repository_url":"https://api.github.com/repos/alphagov/smart-answers","labels_url":"https://api.github.com/repos/alphagov/smart-answers/issues/2532/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/smart-answers/issues/2532/comments","events_url":"https://api.github.com/repos/alphagov/smart-answers/issues/2532/events","html_url":"https://github.com/alphagov/smart-answers/pull/2532","id":154997787,"number":2532,"title":"Avoid using worldwide api helpers in integration tests","user":{"login":"chrisroos","id":6556,"avatar_url":"https://avatars.githubusercontent.com/u/6556?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisroos","html_url":"https://github.com/chrisroos","followers_url":"https://api.github.com/users/chrisroos/followers","following_url":"https://api.github.com/users/chrisroos/following{/other_user}","gists_url":"https://api.github.com/users/chrisroos/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisroos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisroos/subscriptions","organizations_url":"https://api.github.com/users/chrisroos/orgs","repos_url":"https://api.github.com/users/chrisroos/repos","events_url":"https://api.github.com/users/chrisroos/events{/privacy}","received_events_url":"https://api.github.com/users/chrisroos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alphagov/smart-answers/labels/LGTM","name":"LGTM","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"floehopper","id":3169,"avatar_url":"https://avatars.githubusercontent.com/u/3169?v=3","gravatar_id":"","url":"https://api.github.com/users/floehopper","html_url":"https://github.com/floehopper","followers_url":"https://api.github.com/users/floehopper/followers","following_url":"https://api.github.com/users/floehopper/following{/other_user}","gists_url":"https://api.github.com/users/floehopper/gists{/gist_id}","starred_url":"https://api.github.com/users/floehopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floehopper/subscriptions","organizations_url":"https://api.github.com/users/floehopper/orgs","repos_url":"https://api.github.com/users/floehopper/repos","events_url":"https://api.github.com/users/floehopper/events{/privacy}","received_events_url":"https://api.github.com/users/floehopper/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2016-05-16T10:00:04Z","updated_at":"2016-05-19T08:08:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/smart-answers/pulls/2532","html_url":"https://github.com/alphagov/smart-answers/pull/2532","diff_url":"https://github.com/alphagov/smart-answers/pull/2532.diff","patch_url":"https://github.com/alphagov/smart-answers/pull/2532.patch"},"body":"Stubbing `WorldLocation.all` and `WorldLocation.find`, instead of using the `GdsApi::TestHelpers::Worldwide` helper methods, appears to shave about 50-60 seconds off the time it takes to run `rake` (i.e. all but the regression tests) on my machine.\r\n\r\nWe're still using the `GdsApi::TestHelpers::Worldwide` methods in the country_and_date_questions_test, the regression tests and a couple of unit tests. I had hoped that making a similar change to the regression tests would give us a similar performance improvement but that doesn't seem to be the case based on my initial investigation. I plan to dig into this further at another time.\r\n"},"comment":{"url":"https://api.github.com/repos/alphagov/smart-answers/issues/comments/220255705","html_url":"https://github.com/alphagov/smart-answers/pull/2532#issuecomment-220255705","issue_url":"https://api.github.com/repos/alphagov/smart-answers/issues/2532","id":220255705,"user":{"login":"chrisroos","id":6556,"avatar_url":"https://avatars.githubusercontent.com/u/6556?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisroos","html_url":"https://github.com/chrisroos","followers_url":"https://api.github.com/users/chrisroos/followers","following_url":"https://api.github.com/users/chrisroos/following{/other_user}","gists_url":"https://api.github.com/users/chrisroos/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisroos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisroos/subscriptions","organizations_url":"https://api.github.com/users/chrisroos/orgs","repos_url":"https://api.github.com/users/chrisroos/repos","events_url":"https://api.github.com/users/chrisroos/events{/privacy}","received_events_url":"https://api.github.com/users/chrisroos/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T08:08:01Z","updated_at":"2016-05-19T08:08:01Z","body":"I've updated https://trello.com/c/T69SfCaC/86-stub-gds-apis-at-ruby-client-level-vs-net-http-webmock-level with a link to this PR, and a checklist of the remaining tests to convert."}}