GitHub PullRequestReviewCommentEvent at 2014-04-02 14:17:06
Repository: whitehall
Actor: tekin
Payload: {"comment":{"url":"https://api.github.com/repos/alphagov/whitehall/pulls/comments/11206816","id":11206816,"diff_hunk":"@@ -0,0 +1,23 @@\n+require 'test_helper'\n+\n+class AnnouncementClearerTest < ActiveSupport::TestCase\n+  test '#clear! any associated announcement from the search index' do\n+    announcement = create(:statistics_announcement)\n+    statistics = create(:published_statistics,\n+      statistics_announcement: announcement)\n+\n+    ServiceListeners::AnnouncementClearer.new(statistics).clear!\n+\n+    assert_deleted_from_search_index announcement\n+  end\n+\n+  test '#clear! does nothing if the edition does not have an announcement' do\n+    statistics = create(:published_statistics)\n+    ServiceListeners::AnnouncementClearer.new(statistics).clear!\n+  end\n+\n+  test '#clear! does nothing if the edition is not a statistial publication' do","path":"test/unit/services/listeners/announcement_clearer_test.rb","position":null,"original_position":19,"commit_id":"5afb94ba662413ae76457f25a38cb618dc8153aa","original_commit_id":"5cfe562fbd6093864f55638c232f5e9bc46eaf20","user":{"login":"tekin","id":3687,"avatar_url":"https://avatars.githubusercontent.com/u/3687?","gravatar_id":"73f812133e01dac8eb9b67746fe27393","url":"https://api.github.com/users/tekin","html_url":"https://github.com/tekin","followers_url":"https://api.github.com/users/tekin/followers","following_url":"https://api.github.com/users/tekin/following{/other_user}","gists_url":"https://api.github.com/users/tekin/gists{/gist_id}","starred_url":"https://api.github.com/users/tekin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tekin/subscriptions","organizations_url":"https://api.github.com/users/tekin/orgs","repos_url":"https://api.github.com/users/tekin/repos","events_url":"https://api.github.com/users/tekin/events{/privacy}","received_events_url":"https://api.github.com/users/tekin/received_events","type":"User","site_admin":false},"body":"I don't think it's subjective at all. As [this link](http://www.thagomizer.com/blog/2013/06/11/assert-nothing-raised.html) explains, `assert_nothing_raised` is unhelpful because it hides where the exception is being raised, making it harder to fix the code when the test fails. Hence it was actually removed from TestUnit. Rails only keeps it as a stub method because it would be too much pain to rewrite the countless tests that call it already. Therefor, continuing to use it makes no sense, and in fact is likely to cause us future-pain when it's inevitably removed from Rails as well.","created_at":"2014-04-02T14:17:06Z","updated_at":"2014-04-02T14:17:06Z","html_url":"https://github.com/alphagov/whitehall/pull/1402#discussion_r11206816","pull_request_url":"https://api.github.com/repos/alphagov/whitehall/pulls/1402","_links":{"self":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/comments/11206816"},"html":{"href":"https://github.com/alphagov/whitehall/pull/1402#discussion_r11206816"},"pull_request":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/1402"}}}}