{"action":"created","issue":{"url":"https://api.github.com/repos/clearsightstudio/ProMotion-map/issues/27","labels_url":"https://api.github.com/repos/clearsightstudio/ProMotion-map/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/clearsightstudio/ProMotion-map/issues/27/comments","events_url":"https://api.github.com/repos/clearsightstudio/ProMotion-map/issues/27/events","html_url":"https://github.com/clearsightstudio/ProMotion-map/issues/27","id":66878300,"number":27,"title":"Question about the tests","user":{"login":"DiogoAndre","id":572843,"avatar_url":"https://avatars.githubusercontent.com/u/572843?v=3","gravatar_id":"","url":"https://api.github.com/users/DiogoAndre","html_url":"https://github.com/DiogoAndre","followers_url":"https://api.github.com/users/DiogoAndre/followers","following_url":"https://api.github.com/users/DiogoAndre/following{/other_user}","gists_url":"https://api.github.com/users/DiogoAndre/gists{/gist_id}","starred_url":"https://api.github.com/users/DiogoAndre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiogoAndre/subscriptions","organizations_url":"https://api.github.com/users/DiogoAndre/orgs","repos_url":"https://api.github.com/users/DiogoAndre/repos","events_url":"https://api.github.com/users/DiogoAndre/events{/privacy}","received_events_url":"https://api.github.com/users/DiogoAndre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-07T13:10:40Z","updated_at":"2015-04-09T19:25:28Z","closed_at":null,"body":"Hi folks, hope you can help me out a little bit here... \r\n\r\nI'm working on a promotion-map fork to use Mapbox as the map provider. It's going fine, but one test is failing and I can't figure out why.\r\n\r\nHere's what I see:\r\n\r\n```ruby\r\n[FAILED - #<ProMotion::MapScreenAnnotation:0x1162d6900>.==(nil) failed] - should select an annotation by index\r\n```\r\n\r\nThe full test is:\r\n\r\n```ruby\r\n  it \"should select an annotation by index\" do\r\n    map_screen.selected_annotation.should == nil\r\n    map_screen.select_annotation_at 1\r\n    wait 0.75 do\r\n      map_screen.selected_annotation.should == map_screen.annotations[1]\r\n    end\r\n  end\r\n```\r\nI've confirmed that what fails is the very first line of the test. What I can't figure out is why the map_screen is not being reset after each test. Isn't what the ```after``` block is meant to do? The test just before that one selects an annotation and pass. How should the annotation be getting deselect between the two tests?\r\n\r\nSorry for not sharing my full code yet, still cleaning up a few things a little bit to avoid full embarrassment :smile:  "},"comment":{"url":"https://api.github.com/repos/clearsightstudio/ProMotion-map/issues/comments/91333689","html_url":"https://github.com/clearsightstudio/ProMotion-map/issues/27#issuecomment-91333689","issue_url":"https://api.github.com/repos/clearsightstudio/ProMotion-map/issues/27","id":91333689,"user":{"login":"DiogoAndre","id":572843,"avatar_url":"https://avatars.githubusercontent.com/u/572843?v=3","gravatar_id":"","url":"https://api.github.com/users/DiogoAndre","html_url":"https://github.com/DiogoAndre","followers_url":"https://api.github.com/users/DiogoAndre/followers","following_url":"https://api.github.com/users/DiogoAndre/following{/other_user}","gists_url":"https://api.github.com/users/DiogoAndre/gists{/gist_id}","starred_url":"https://api.github.com/users/DiogoAndre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiogoAndre/subscriptions","organizations_url":"https://api.github.com/users/DiogoAndre/orgs","repos_url":"https://api.github.com/users/DiogoAndre/repos","events_url":"https://api.github.com/users/DiogoAndre/events{/privacy}","received_events_url":"https://api.github.com/users/DiogoAndre/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T19:25:28Z","updated_at":"2015-04-09T19:25:28Z","body":"Thanks @carlinisaacson!  I gone with a workaround of deselecting the annotation after each test that selects one. \r\n\r\nI just tried setting ```@map_screen = nil``` in the after block, but then a bunch o other tests started failing, even in the master branch (without my changes), still have to look exactly why though.. "}}