{"action":"created","comment":{"url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments/40528929","id":40528929,"diff_hunk":"@@ -1,12 +1,54 @@\n require 'rails_helper'\n \n RSpec.describe Release do\n-  describe '#version' do\n-    let(:commit) { GitCommit.new(id: 'abc') }\n-    subject(:release) { described_class.new(commit: commit) }\n+  let(:commit) { GitCommit.new(id: 'abc') }\n+  let(:feature_review1) { instance_double(FeatureReview) }\n+  let(:feature_review2) { instance_double(FeatureReview) }\n+  let(:feature_reviews) { [feature_review1, feature_review2] }\n+\n+  subject(:release) { described_class.new(commit: commit) }\n \n+  describe '#version' do\n     it 'returns the commit id' do\n       expect(release.version).to eq('abc')\n     end\n   end\n+\n+  describe '#approved?' do\n+    subject(:release) { Release.new(feature_reviews: feature_reviews) }\n+\n+    it 'returns true if any of its feature reviews are approved' do\n+      allow(feature_review1).to receive(:approved?).and_return(true)\n+      allow(feature_review2).to receive(:approved?).and_return(false)\n+      expect(release.approved?).to be true\n+    end\n+\n+    it 'returns false if none of its feature reviews are approved' do\n+      allow(feature_review1).to receive(:approved?).and_return(false)\n+      allow(feature_review2).to receive(:approved?).and_return(false)\n+      expect(release.approved?).to eq(false)\n+    end\n+  end\n+\n+  describe '#approval_status' do\n+    context 'when release has NO feature review(s)' do\n+      it 'returns blank when the release has no features' do","path":"spec/models/release_spec.rb","position":38,"original_position":38,"commit_id":"475afb3430bf329bd13cf45fa42fe4bfd23e4764","original_commit_id":"475afb3430bf329bd13cf45fa42fe4bfd23e4764","user":{"login":"andistuder","id":1047920,"avatar_url":"https://avatars.githubusercontent.com/u/1047920?v=3","gravatar_id":"","url":"https://api.github.com/users/andistuder","html_url":"https://github.com/andistuder","followers_url":"https://api.github.com/users/andistuder/followers","following_url":"https://api.github.com/users/andistuder/following{/other_user}","gists_url":"https://api.github.com/users/andistuder/gists{/gist_id}","starred_url":"https://api.github.com/users/andistuder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andistuder/subscriptions","organizations_url":"https://api.github.com/users/andistuder/orgs","repos_url":"https://api.github.com/users/andistuder/repos","events_url":"https://api.github.com/users/andistuder/events{/privacy}","received_events_url":"https://api.github.com/users/andistuder/received_events","type":"User","site_admin":false},"body":"Less is more, thanks. ","created_at":"2015-09-28T08:42:16Z","updated_at":"2015-09-28T08:42:16Z","html_url":"https://github.com/FundingCircle/shipment_tracker/pull/28#discussion_r40528929","pull_request_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments/40528929"},"html":{"href":"https://github.com/FundingCircle/shipment_tracker/pull/28#discussion_r40528929"},"pull_request":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28","id":46023241,"html_url":"https://github.com/FundingCircle/shipment_tracker/pull/28","diff_url":"https://github.com/FundingCircle/shipment_tracker/pull/28.diff","patch_url":"https://github.com/FundingCircle/shipment_tracker/pull/28.patch","issue_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/28","number":28,"state":"open","locked":false,"title":"refactor releases project","user":{"login":"andistuder","id":1047920,"avatar_url":"https://avatars.githubusercontent.com/u/1047920?v=3","gravatar_id":"","url":"https://api.github.com/users/andistuder","html_url":"https://github.com/andistuder","followers_url":"https://api.github.com/users/andistuder/followers","following_url":"https://api.github.com/users/andistuder/following{/other_user}","gists_url":"https://api.github.com/users/andistuder/gists{/gist_id}","starred_url":"https://api.github.com/users/andistuder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andistuder/subscriptions","organizations_url":"https://api.github.com/users/andistuder/orgs","repos_url":"https://api.github.com/users/andistuder/repos","events_url":"https://api.github.com/users/andistuder/events{/privacy}","received_events_url":"https://api.github.com/users/andistuder/received_events","type":"User","site_admin":false},"body":"preload all feature reviews to increas performance\r\nno longer use release query to simply structure","created_at":"2015-09-25T15:15:11Z","updated_at":"2015-09-28T08:42:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0990e7456a27d6ce1dbab1bd34499fcc9f98c5c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28/commits","review_comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28/comments","review_comment_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/28/comments","statuses_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/475afb3430bf329bd13cf45fa42fe4bfd23e4764","head":{"label":"FundingCircle:releases_performance","ref":"releases_performance","sha":"475afb3430bf329bd13cf45fa42fe4bfd23e4764","user":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"repo":{"id":34510688,"name":"shipment_tracker","full_name":"FundingCircle/shipment_tracker","owner":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FundingCircle/shipment_tracker","description":"Tracks shipment of software versions for Financial Conduct Authority auditing purposes","fork":false,"url":"https://api.github.com/repos/FundingCircle/shipment_tracker","forks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/forks","keys_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/teams","hooks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/hooks","issue_events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/events{/number}","events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/events","assignees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/assignees{/user}","branches_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/branches{/branch}","tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/tags","blobs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/languages","stargazers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/stargazers","contributors_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contributors","subscribers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscribers","subscription_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscription","commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contents/{+path}","compare_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/merges","archive_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/downloads","issues_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues{/number}","pulls_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/labels{/name}","releases_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/releases{/id}","created_at":"2015-04-24T09:43:59Z","updated_at":"2015-08-12T11:55:00Z","pushed_at":"2015-09-25T15:51:35Z","git_url":"git://github.com/FundingCircle/shipment_tracker.git","ssh_url":"git@github.com:FundingCircle/shipment_tracker.git","clone_url":"https://github.com/FundingCircle/shipment_tracker.git","svn_url":"https://github.com/FundingCircle/shipment_tracker","homepage":"","size":2408,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"FundingCircle:master","ref":"master","sha":"0195ac64341af8e8bdf1a7ae60517d59b5d961de","user":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"repo":{"id":34510688,"name":"shipment_tracker","full_name":"FundingCircle/shipment_tracker","owner":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FundingCircle/shipment_tracker","description":"Tracks shipment of software versions for Financial Conduct Authority auditing purposes","fork":false,"url":"https://api.github.com/repos/FundingCircle/shipment_tracker","forks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/forks","keys_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/teams","hooks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/hooks","issue_events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/events{/number}","events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/events","assignees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/assignees{/user}","branches_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/branches{/branch}","tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/tags","blobs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/languages","stargazers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/stargazers","contributors_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contributors","subscribers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscribers","subscription_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscription","commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contents/{+path}","compare_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/merges","archive_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/downloads","issues_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues{/number}","pulls_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/labels{/name}","releases_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/releases{/id}","created_at":"2015-04-24T09:43:59Z","updated_at":"2015-08-12T11:55:00Z","pushed_at":"2015-09-25T15:51:35Z","git_url":"git://github.com/FundingCircle/shipment_tracker.git","ssh_url":"git@github.com:FundingCircle/shipment_tracker.git","clone_url":"https://github.com/FundingCircle/shipment_tracker.git","svn_url":"https://github.com/FundingCircle/shipment_tracker","homepage":"","size":2408,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28"},"html":{"href":"https://github.com/FundingCircle/shipment_tracker/pull/28"},"issue":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/28"},"comments":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/475afb3430bf329bd13cf45fa42fe4bfd23e4764"}}}}