{"action":"created","issue":{"url":"https://api.github.com/repos/kstevens715/minitest-bang/issues/5","labels_url":"https://api.github.com/repos/kstevens715/minitest-bang/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/kstevens715/minitest-bang/issues/5/comments","events_url":"https://api.github.com/repos/kstevens715/minitest-bang/issues/5/events","html_url":"https://github.com/kstevens715/minitest-bang/issues/5","id":75227904,"number":5,"title":"Use let! with before(:each)","user":{"login":"sivagollapalli","id":280199,"avatar_url":"https://avatars.githubusercontent.com/u/280199?v=3","gravatar_id":"","url":"https://api.github.com/users/sivagollapalli","html_url":"https://github.com/sivagollapalli","followers_url":"https://api.github.com/users/sivagollapalli/followers","following_url":"https://api.github.com/users/sivagollapalli/following{/other_user}","gists_url":"https://api.github.com/users/sivagollapalli/gists{/gist_id}","starred_url":"https://api.github.com/users/sivagollapalli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sivagollapalli/subscriptions","organizations_url":"https://api.github.com/users/sivagollapalli/orgs","repos_url":"https://api.github.com/users/sivagollapalli/repos","events_url":"https://api.github.com/users/sivagollapalli/events{/privacy}","received_events_url":"https://api.github.com/users/sivagollapalli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-11T13:44:01Z","updated_at":"2015-06-03T01:29:38Z","closed_at":null,"body":"```\r\nrequire 'test_helper'\r\n\r\ndescribe \"Sample\" do\r\n  before do\r\n    puts \"Top describe\"\r\n  end \r\n\r\n  describe \"inside context c1\" do\r\n    let!(:m1) { puts \"In m1 method\" }\r\n\r\n    describe \"inside context c2\" do\r\n      let!(:m2) { puts \"In m2 method\"}\r\n\r\n      before(:each) do\r\n        puts \"Inside c2 before block\"\r\n      end \r\n\r\n      it \"first example\" do\r\n        puts \"inside first example\"\r\n      end \r\n    end \r\n  end\r\nend\r\n```\r\n\r\nOutput of above spec:\r\n\r\n```\r\nIn m1 method\r\nIn m2 method\r\nTop describe\r\nInside c2 before block\r\ninside first example\r\n```\r\nInstead of\r\n\r\n```\r\nTop describe\r\nIn m1 method\r\nIn m2 method\r\nInside c2 before block\r\ninside first example\r\n```\r\n\r\nAs per my understanding `let! ` takes precedence over `before(:each)` block. I hope this a bug. "},"comment":{"url":"https://api.github.com/repos/kstevens715/minitest-bang/issues/comments/108152007","html_url":"https://github.com/kstevens715/minitest-bang/issues/5#issuecomment-108152007","issue_url":"https://api.github.com/repos/kstevens715/minitest-bang/issues/5","id":108152007,"user":{"login":"kstevens715","id":1191305,"avatar_url":"https://avatars.githubusercontent.com/u/1191305?v=3","gravatar_id":"","url":"https://api.github.com/users/kstevens715","html_url":"https://github.com/kstevens715","followers_url":"https://api.github.com/users/kstevens715/followers","following_url":"https://api.github.com/users/kstevens715/following{/other_user}","gists_url":"https://api.github.com/users/kstevens715/gists{/gist_id}","starred_url":"https://api.github.com/users/kstevens715/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kstevens715/subscriptions","organizations_url":"https://api.github.com/users/kstevens715/orgs","repos_url":"https://api.github.com/users/kstevens715/repos","events_url":"https://api.github.com/users/kstevens715/events{/privacy}","received_events_url":"https://api.github.com/users/kstevens715/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T01:29:38Z","updated_at":"2015-06-03T01:29:38Z","body":"I experimented with RSpec's behavior and wrote two failing tests for this gem based on what I found: 31761ee5ef8dcff. This will be quite the challenge to get working in MiniTest. I'll give it a shot though."}}