{"action":"created","comment":{"url":"https://api.github.com/repos/smartpension/hammer/pulls/comments/45332456","id":45332456,"diff_hunk":"@@ -12,6 +12,10 @@ def full_messages\n         form.try(:errors).try(:full_messages)\n       end\n \n+      def message\n+        form.try(:errors).try(:full_messages).try(:join, '.')\n+      end","path":"lib/hammer/errors/validation_error.rb","position":null,"original_position":6,"commit_id":"186ab26f2d56ffec65d9a45786c12636a909fae7","original_commit_id":"4308ae6b4b02e08c4f7363e381643c30516e0843","user":{"login":"os6sense","id":934066,"avatar_url":"https://avatars.githubusercontent.com/u/934066?v=3","gravatar_id":"","url":"https://api.github.com/users/os6sense","html_url":"https://github.com/os6sense","followers_url":"https://api.github.com/users/os6sense/followers","following_url":"https://api.github.com/users/os6sense/following{/other_user}","gists_url":"https://api.github.com/users/os6sense/gists{/gist_id}","starred_url":"https://api.github.com/users/os6sense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/os6sense/subscriptions","organizations_url":"https://api.github.com/users/os6sense/orgs","repos_url":"https://api.github.com/users/os6sense/repos","events_url":"https://api.github.com/users/os6sense/events{/privacy}","received_events_url":"https://api.github.com/users/os6sense/received_events","type":"User","site_admin":false},"body":"Doh :+1:","created_at":"2015-11-19T12:07:35Z","updated_at":"2015-11-19T12:07:35Z","html_url":"https://github.com/smartpension/hammer/pull/20#discussion_r45332456","pull_request_url":"https://api.github.com/repos/smartpension/hammer/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/smartpension/hammer/pulls/comments/45332456"},"html":{"href":"https://github.com/smartpension/hammer/pull/20#discussion_r45332456"},"pull_request":{"href":"https://api.github.com/repos/smartpension/hammer/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/smartpension/hammer/pulls/20","id":51212806,"html_url":"https://github.com/smartpension/hammer/pull/20","diff_url":"https://github.com/smartpension/hammer/pull/20.diff","patch_url":"https://github.com/smartpension/hammer/pull/20.patch","issue_url":"https://api.github.com/repos/smartpension/hammer/issues/20","number":20,"state":"open","locked":false,"title":"When ValidationErrors are raised, especially in the API, we are testi…","user":{"login":"os6sense","id":934066,"avatar_url":"https://avatars.githubusercontent.com/u/934066?v=3","gravatar_id":"","url":"https://api.github.com/users/os6sense","html_url":"https://github.com/os6sense","followers_url":"https://api.github.com/users/os6sense/followers","following_url":"https://api.github.com/users/os6sense/following{/other_user}","gists_url":"https://api.github.com/users/os6sense/gists{/gist_id}","starred_url":"https://api.github.com/users/os6sense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/os6sense/subscriptions","organizations_url":"https://api.github.com/users/os6sense/orgs","repos_url":"https://api.github.com/users/os6sense/repos","events_url":"https://api.github.com/users/os6sense/events{/privacy}","received_events_url":"https://api.github.com/users/os6sense/received_events","type":"User","site_admin":false},"body":"…ng that an error is raised within the spec. The problem with just testing that a validation error is raised is that we cant be certain that the validation error raised is for the reasons which we are expecting meaning that a validation error *may* be raised for reasons other than that which we were testing for. Overriding message means that the expectation test can be expanded to check that the message is conversant with that which we expected to be raised. i.e. \r\n\r\n    it 'raises a validation error' do\r\n      expect { subject }.to raise_error(ValidationError, 'Pay on date is overlaping with a postponement period')\r\n    end\r\n","created_at":"2015-11-19T11:53:28Z","updated_at":"2015-11-19T12:07:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99770566aef38da78151ee7ad1a3ac53ea02985b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/smartpension/hammer/pulls/20/commits","review_comments_url":"https://api.github.com/repos/smartpension/hammer/pulls/20/comments","review_comment_url":"https://api.github.com/repos/smartpension/hammer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smartpension/hammer/issues/20/comments","statuses_url":"https://api.github.com/repos/smartpension/hammer/statuses/186ab26f2d56ffec65d9a45786c12636a909fae7","head":{"label":"smartpension:feature/error_message","ref":"feature/error_message","sha":"186ab26f2d56ffec65d9a45786c12636a909fae7","user":{"login":"smartpension","id":8361143,"avatar_url":"https://avatars.githubusercontent.com/u/8361143?v=3","gravatar_id":"","url":"https://api.github.com/users/smartpension","html_url":"https://github.com/smartpension","followers_url":"https://api.github.com/users/smartpension/followers","following_url":"https://api.github.com/users/smartpension/following{/other_user}","gists_url":"https://api.github.com/users/smartpension/gists{/gist_id}","starred_url":"https://api.github.com/users/smartpension/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartpension/subscriptions","organizations_url":"https://api.github.com/users/smartpension/orgs","repos_url":"https://api.github.com/users/smartpension/repos","events_url":"https://api.github.com/users/smartpension/events{/privacy}","received_events_url":"https://api.github.com/users/smartpension/received_events","type":"Organization","site_admin":false},"repo":{"id":36651953,"name":"hammer","full_name":"smartpension/hammer","owner":{"login":"smartpension","id":8361143,"avatar_url":"https://avatars.githubusercontent.com/u/8361143?v=3","gravatar_id":"","url":"https://api.github.com/users/smartpension","html_url":"https://github.com/smartpension","followers_url":"https://api.github.com/users/smartpension/followers","following_url":"https://api.github.com/users/smartpension/following{/other_user}","gists_url":"https://api.github.com/users/smartpension/gists{/gist_id}","starred_url":"https://api.github.com/users/smartpension/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartpension/subscriptions","organizations_url":"https://api.github.com/users/smartpension/orgs","repos_url":"https://api.github.com/users/smartpension/repos","events_url":"https://api.github.com/users/smartpension/events{/privacy}","received_events_url":"https://api.github.com/users/smartpension/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smartpension/hammer","description":"","fork":false,"url":"https://api.github.com/repos/smartpension/hammer","forks_url":"https://api.github.com/repos/smartpension/hammer/forks","keys_url":"https://api.github.com/repos/smartpension/hammer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smartpension/hammer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smartpension/hammer/teams","hooks_url":"https://api.github.com/repos/smartpension/hammer/hooks","issue_events_url":"https://api.github.com/repos/smartpension/hammer/issues/events{/number}","events_url":"https://api.github.com/repos/smartpension/hammer/events","assignees_url":"https://api.github.com/repos/smartpension/hammer/assignees{/user}","branches_url":"https://api.github.com/repos/smartpension/hammer/branches{/branch}","tags_url":"https://api.github.com/repos/smartpension/hammer/tags","blobs_url":"https://api.github.com/repos/smartpension/hammer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smartpension/hammer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smartpension/hammer/git/refs{/sha}","trees_url":"https://api.github.com/repos/smartpension/hammer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smartpension/hammer/statuses/{sha}","languages_url":"https://api.github.com/repos/smartpension/hammer/languages","stargazers_url":"https://api.github.com/repos/smartpension/hammer/stargazers","contributors_url":"https://api.github.com/repos/smartpension/hammer/contributors","subscribers_url":"https://api.github.com/repos/smartpension/hammer/subscribers","subscription_url":"https://api.github.com/repos/smartpension/hammer/subscription","commits_url":"https://api.github.com/repos/smartpension/hammer/commits{/sha}","git_commits_url":"https://api.github.com/repos/smartpension/hammer/git/commits{/sha}","comments_url":"https://api.github.com/repos/smartpension/hammer/comments{/number}","issue_comment_url":"https://api.github.com/repos/smartpension/hammer/issues/comments{/number}","contents_url":"https://api.github.com/repos/smartpension/hammer/contents/{+path}","compare_url":"https://api.github.com/repos/smartpension/hammer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smartpension/hammer/merges","archive_url":"https://api.github.com/repos/smartpension/hammer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smartpension/hammer/downloads","issues_url":"https://api.github.com/repos/smartpension/hammer/issues{/number}","pulls_url":"https://api.github.com/repos/smartpension/hammer/pulls{/number}","milestones_url":"https://api.github.com/repos/smartpension/hammer/milestones{/number}","notifications_url":"https://api.github.com/repos/smartpension/hammer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smartpension/hammer/labels{/name}","releases_url":"https://api.github.com/repos/smartpension/hammer/releases{/id}","created_at":"2015-06-01T09:51:05Z","updated_at":"2015-06-05T09:13:14Z","pushed_at":"2015-11-19T12:07:22Z","git_url":"git://github.com/smartpension/hammer.git","ssh_url":"git@github.com:smartpension/hammer.git","clone_url":"https://github.com/smartpension/hammer.git","svn_url":"https://github.com/smartpension/hammer","homepage":null,"size":96,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"smartpension:master","ref":"master","sha":"3265669fdacc160ebc510c87d7cac26b5bcf43b9","user":{"login":"smartpension","id":8361143,"avatar_url":"https://avatars.githubusercontent.com/u/8361143?v=3","gravatar_id":"","url":"https://api.github.com/users/smartpension","html_url":"https://github.com/smartpension","followers_url":"https://api.github.com/users/smartpension/followers","following_url":"https://api.github.com/users/smartpension/following{/other_user}","gists_url":"https://api.github.com/users/smartpension/gists{/gist_id}","starred_url":"https://api.github.com/users/smartpension/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartpension/subscriptions","organizations_url":"https://api.github.com/users/smartpension/orgs","repos_url":"https://api.github.com/users/smartpension/repos","events_url":"https://api.github.com/users/smartpension/events{/privacy}","received_events_url":"https://api.github.com/users/smartpension/received_events","type":"Organization","site_admin":false},"repo":{"id":36651953,"name":"hammer","full_name":"smartpension/hammer","owner":{"login":"smartpension","id":8361143,"avatar_url":"https://avatars.githubusercontent.com/u/8361143?v=3","gravatar_id":"","url":"https://api.github.com/users/smartpension","html_url":"https://github.com/smartpension","followers_url":"https://api.github.com/users/smartpension/followers","following_url":"https://api.github.com/users/smartpension/following{/other_user}","gists_url":"https://api.github.com/users/smartpension/gists{/gist_id}","starred_url":"https://api.github.com/users/smartpension/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartpension/subscriptions","organizations_url":"https://api.github.com/users/smartpension/orgs","repos_url":"https://api.github.com/users/smartpension/repos","events_url":"https://api.github.com/users/smartpension/events{/privacy}","received_events_url":"https://api.github.com/users/smartpension/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smartpension/hammer","description":"","fork":false,"url":"https://api.github.com/repos/smartpension/hammer","forks_url":"https://api.github.com/repos/smartpension/hammer/forks","keys_url":"https://api.github.com/repos/smartpension/hammer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smartpension/hammer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smartpension/hammer/teams","hooks_url":"https://api.github.com/repos/smartpension/hammer/hooks","issue_events_url":"https://api.github.com/repos/smartpension/hammer/issues/events{/number}","events_url":"https://api.github.com/repos/smartpension/hammer/events","assignees_url":"https://api.github.com/repos/smartpension/hammer/assignees{/user}","branches_url":"https://api.github.com/repos/smartpension/hammer/branches{/branch}","tags_url":"https://api.github.com/repos/smartpension/hammer/tags","blobs_url":"https://api.github.com/repos/smartpension/hammer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smartpension/hammer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smartpension/hammer/git/refs{/sha}","trees_url":"https://api.github.com/repos/smartpension/hammer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smartpension/hammer/statuses/{sha}","languages_url":"https://api.github.com/repos/smartpension/hammer/languages","stargazers_url":"https://api.github.com/repos/smartpension/hammer/stargazers","contributors_url":"https://api.github.com/repos/smartpension/hammer/contributors","subscribers_url":"https://api.github.com/repos/smartpension/hammer/subscribers","subscription_url":"https://api.github.com/repos/smartpension/hammer/subscription","commits_url":"https://api.github.com/repos/smartpension/hammer/commits{/sha}","git_commits_url":"https://api.github.com/repos/smartpension/hammer/git/commits{/sha}","comments_url":"https://api.github.com/repos/smartpension/hammer/comments{/number}","issue_comment_url":"https://api.github.com/repos/smartpension/hammer/issues/comments{/number}","contents_url":"https://api.github.com/repos/smartpension/hammer/contents/{+path}","compare_url":"https://api.github.com/repos/smartpension/hammer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smartpension/hammer/merges","archive_url":"https://api.github.com/repos/smartpension/hammer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smartpension/hammer/downloads","issues_url":"https://api.github.com/repos/smartpension/hammer/issues{/number}","pulls_url":"https://api.github.com/repos/smartpension/hammer/pulls{/number}","milestones_url":"https://api.github.com/repos/smartpension/hammer/milestones{/number}","notifications_url":"https://api.github.com/repos/smartpension/hammer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smartpension/hammer/labels{/name}","releases_url":"https://api.github.com/repos/smartpension/hammer/releases{/id}","created_at":"2015-06-01T09:51:05Z","updated_at":"2015-06-05T09:13:14Z","pushed_at":"2015-11-19T12:07:22Z","git_url":"git://github.com/smartpension/hammer.git","ssh_url":"git@github.com:smartpension/hammer.git","clone_url":"https://github.com/smartpension/hammer.git","svn_url":"https://github.com/smartpension/hammer","homepage":null,"size":96,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/smartpension/hammer/pulls/20"},"html":{"href":"https://github.com/smartpension/hammer/pull/20"},"issue":{"href":"https://api.github.com/repos/smartpension/hammer/issues/20"},"comments":{"href":"https://api.github.com/repos/smartpension/hammer/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/smartpension/hammer/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/smartpension/hammer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smartpension/hammer/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/smartpension/hammer/statuses/186ab26f2d56ffec65d9a45786c12636a909fae7"}}}}