{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments/70181345","id":70181345,"diff_hunk":"@@ -0,0 +1,110 @@\n+require 'airport'\n+\n+describe Airport do\n+\n+\n+  it { is_expected.to respond_to(:land).with(1).argument }\n+  it { is_expected.to respond_to(:take_off).with(1).argument }\n+  it { is_expected.to respond_to(:hanger)}\n+\n+  let(:plane) {double(:plane)}\n+  let(:subject) {Airport.new}\n+  let(:weather) {double(:weather)}\n+\n+  let(:planes_arr) do\n+    red_plane = double(:plane)\n+    green_plane = double(:plane)\n+    blue_plane = double(:plane)\n+    return [red_plane, blue_plane, green_plane]\n+  end\n+\n+\n+  describe '#initialize' do\n+    it 'has a variable capacity' do\n+      allow(plane).to receive(:airborne).and_return(true)\n+      allow(plane).to receive(:down)\n+      subject = Airport.new(1)\n+      red_plane = double(:red_plane)\n+      subject.land plane\n+      expect{ subject.land red_plane }.to raise_error 'Airport Full'\n+    end\n+\n+  end\n+\n+  describe '#land' do\n+    it 'planes enter the airport when they land' do\n+      allow(plane).to receive(:airborne).and_return(true)\n+      allow(plane).to receive(:down)\n+      subject.land plane\n+      expect(subject.hanger).to eq [plane]\n+    end\n+    it 'planes cannot land if airport is full' do\n+      allow(plane).to receive(:airborne).and_return(true)\n+      allow(plane).to receive(:down)\n+      subject = Airport.new(3)\n+      planes_arr.each do |x|\n+        allow(x).to receive(:airborne).and_return(true)\n+        allow(x).to receive(:down)\n+        subject.land(x)\n+      end\n+      expect{subject.land plane}.to raise_error 'Airport Full'\n+    end\n+    it 'planes cannot land when weather is bad' do\n+      allow(plane).to receive(:airborne).and_return(true)\n+      allow(Weather).to receive(:is_fair).and_return(false)\n+      expect { subject.land plane }.to raise_error 'It is too dangerous to do that right now.'\n+\n+    end\n+    it 'planes cannot land if they are not airborne' do\n+      allow(plane).to receive(:airborne).and_return(false)\n+      expect {subject.land plane}.to raise_error 'That plane is not airborne, so cannot land'\n+\n+    end\n+    it 'planes cannot land if they are already in the airport' do\n+      allow(plane).to receive(:airborne).and_return(true)\n+      allow(plane).to receive(:down)\n+      subject.land plane\n+      expect {subject.land plane}.to raise_error 'this plane is already at this airport!'\n+    end\n+    it 'planes cannot land if they are in another airport' do\n+      allow(plane).to receive(:airborne).and_return(true)\n+      allow(plane).to receive(:down)\n+      gatwick = Airport.new\n+      heathrow = Airport.new\n+      gatwick.land(plane)\n+      allow(plane).to receive(:airborne).and_return(false)\n+      expect{heathrow.land plane}.to raise_error 'That plane is not airborne, so cannot land'\n+    end\n+  end\n+\n+  describe '#take_off' do\n+    it 'planes leave the airport after takeoff' do\n+      allow(plane).to receive(:up)\n+      allow(plane).to receive(:down)\n+      allow(plane).to receive(:airborne).and_return(true)\n+      subject.land(plane)\n+      allow(plane).to receive(:airborne).and_return(false)\n+      subject.take_off plane\n+      expect(subject.hanger).to eq []\n+    end\n+    it 'planes cannot take off when weather is bad' do\n+      allow(plane).to receive(:airborne).and_return(true)\n+      allow(plane).to receive(:down)\n+      subject.land(plane)\n+      allow(plane).to receive(:airborne).and_return(false)\n+      allow(Weather).to receive(:is_fair).and_return(false)\n+      expect { subject.take_off plane }.to raise_error 'It is too dangerous to do that right now.'","path":"spec/airport_spec.rb","position":96,"original_position":96,"commit_id":"cf563d9a2f9c7d4a1283495c9fee10745b605f7c","original_commit_id":"cf563d9a2f9c7d4a1283495c9fee10745b605f7c","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Metrics/LineLength: Line is too long. [98/80] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)","created_at":"2016-07-10T12:44:06Z","updated_at":"2016-07-10T12:44:06Z","html_url":"https://github.com/makersacademy/airport_challenge/pull/459#discussion_r70181345","pull_request_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments/70181345"},"html":{"href":"https://github.com/makersacademy/airport_challenge/pull/459#discussion_r70181345"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459","id":76872432,"html_url":"https://github.com/makersacademy/airport_challenge/pull/459","diff_url":"https://github.com/makersacademy/airport_challenge/pull/459.diff","patch_url":"https://github.com/makersacademy/airport_challenge/pull/459.patch","issue_url":"https://api.github.com/repos/makersacademy/airport_challenge/issues/459","number":459,"state":"open","locked":false,"title":"Airport Challenge","user":{"login":"JackOddy","id":17657697,"avatar_url":"https://avatars.githubusercontent.com/u/17657697?v=3","gravatar_id":"","url":"https://api.github.com/users/JackOddy","html_url":"https://github.com/JackOddy","followers_url":"https://api.github.com/users/JackOddy/followers","following_url":"https://api.github.com/users/JackOddy/following{/other_user}","gists_url":"https://api.github.com/users/JackOddy/gists{/gist_id}","starred_url":"https://api.github.com/users/JackOddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackOddy/subscriptions","organizations_url":"https://api.github.com/users/JackOddy/orgs","repos_url":"https://api.github.com/users/JackOddy/repos","events_url":"https://api.github.com/users/JackOddy/events{/privacy}","received_events_url":"https://api.github.com/users/JackOddy/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-10T12:44:01Z","updated_at":"2016-07-10T12:44:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17c560591190d3068a8f017bdbc33088dfc7648d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459/commits","review_comments_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459/comments","review_comment_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/makersacademy/airport_challenge/issues/459/comments","statuses_url":"https://api.github.com/repos/makersacademy/airport_challenge/statuses/cf563d9a2f9c7d4a1283495c9fee10745b605f7c","head":{"label":"JackOddy:master","ref":"master","sha":"cf563d9a2f9c7d4a1283495c9fee10745b605f7c","user":{"login":"JackOddy","id":17657697,"avatar_url":"https://avatars.githubusercontent.com/u/17657697?v=3","gravatar_id":"","url":"https://api.github.com/users/JackOddy","html_url":"https://github.com/JackOddy","followers_url":"https://api.github.com/users/JackOddy/followers","following_url":"https://api.github.com/users/JackOddy/following{/other_user}","gists_url":"https://api.github.com/users/JackOddy/gists{/gist_id}","starred_url":"https://api.github.com/users/JackOddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackOddy/subscriptions","organizations_url":"https://api.github.com/users/JackOddy/orgs","repos_url":"https://api.github.com/users/JackOddy/repos","events_url":"https://api.github.com/users/JackOddy/events{/privacy}","received_events_url":"https://api.github.com/users/JackOddy/received_events","type":"User","site_admin":false},"repo":{"id":62957745,"name":"airport_challenge","full_name":"JackOddy/airport_challenge","owner":{"login":"JackOddy","id":17657697,"avatar_url":"https://avatars.githubusercontent.com/u/17657697?v=3","gravatar_id":"","url":"https://api.github.com/users/JackOddy","html_url":"https://github.com/JackOddy","followers_url":"https://api.github.com/users/JackOddy/followers","following_url":"https://api.github.com/users/JackOddy/following{/other_user}","gists_url":"https://api.github.com/users/JackOddy/gists{/gist_id}","starred_url":"https://api.github.com/users/JackOddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackOddy/subscriptions","organizations_url":"https://api.github.com/users/JackOddy/orgs","repos_url":"https://api.github.com/users/JackOddy/repos","events_url":"https://api.github.com/users/JackOddy/events{/privacy}","received_events_url":"https://api.github.com/users/JackOddy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JackOddy/airport_challenge","description":"Fly!","fork":true,"url":"https://api.github.com/repos/JackOddy/airport_challenge","forks_url":"https://api.github.com/repos/JackOddy/airport_challenge/forks","keys_url":"https://api.github.com/repos/JackOddy/airport_challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JackOddy/airport_challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JackOddy/airport_challenge/teams","hooks_url":"https://api.github.com/repos/JackOddy/airport_challenge/hooks","issue_events_url":"https://api.github.com/repos/JackOddy/airport_challenge/issues/events{/number}","events_url":"https://api.github.com/repos/JackOddy/airport_challenge/events","assignees_url":"https://api.github.com/repos/JackOddy/airport_challenge/assignees{/user}","branches_url":"https://api.github.com/repos/JackOddy/airport_challenge/branches{/branch}","tags_url":"https://api.github.com/repos/JackOddy/airport_challenge/tags","blobs_url":"https://api.github.com/repos/JackOddy/airport_challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JackOddy/airport_challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JackOddy/airport_challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/JackOddy/airport_challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JackOddy/airport_challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/JackOddy/airport_challenge/languages","stargazers_url":"https://api.github.com/repos/JackOddy/airport_challenge/stargazers","contributors_url":"https://api.github.com/repos/JackOddy/airport_challenge/contributors","subscribers_url":"https://api.github.com/repos/JackOddy/airport_challenge/subscribers","subscription_url":"https://api.github.com/repos/JackOddy/airport_challenge/subscription","commits_url":"https://api.github.com/repos/JackOddy/airport_challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/JackOddy/airport_challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/JackOddy/airport_challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/JackOddy/airport_challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/JackOddy/airport_challenge/contents/{+path}","compare_url":"https://api.github.com/repos/JackOddy/airport_challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JackOddy/airport_challenge/merges","archive_url":"https://api.github.com/repos/JackOddy/airport_challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JackOddy/airport_challenge/downloads","issues_url":"https://api.github.com/repos/JackOddy/airport_challenge/issues{/number}","pulls_url":"https://api.github.com/repos/JackOddy/airport_challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/JackOddy/airport_challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/JackOddy/airport_challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JackOddy/airport_challenge/labels{/name}","releases_url":"https://api.github.com/repos/JackOddy/airport_challenge/releases{/id}","deployments_url":"https://api.github.com/repos/JackOddy/airport_challenge/deployments","created_at":"2016-07-09T16:12:42Z","updated_at":"2016-07-09T16:12:45Z","pushed_at":"2016-07-10T12:39:50Z","git_url":"git://github.com/JackOddy/airport_challenge.git","ssh_url":"git@github.com:JackOddy/airport_challenge.git","clone_url":"https://github.com/JackOddy/airport_challenge.git","svn_url":"https://github.com/JackOddy/airport_challenge","homepage":"","size":25465,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"makersacademy:master","ref":"master","sha":"260e84a7f2ec1fe5e3257ebcf1509ce99e75ce89","user":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":27074983,"name":"airport_challenge","full_name":"makersacademy/airport_challenge","owner":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/makersacademy/airport_challenge","description":"Fly!","fork":false,"url":"https://api.github.com/repos/makersacademy/airport_challenge","forks_url":"https://api.github.com/repos/makersacademy/airport_challenge/forks","keys_url":"https://api.github.com/repos/makersacademy/airport_challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makersacademy/airport_challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makersacademy/airport_challenge/teams","hooks_url":"https://api.github.com/repos/makersacademy/airport_challenge/hooks","issue_events_url":"https://api.github.com/repos/makersacademy/airport_challenge/issues/events{/number}","events_url":"https://api.github.com/repos/makersacademy/airport_challenge/events","assignees_url":"https://api.github.com/repos/makersacademy/airport_challenge/assignees{/user}","branches_url":"https://api.github.com/repos/makersacademy/airport_challenge/branches{/branch}","tags_url":"https://api.github.com/repos/makersacademy/airport_challenge/tags","blobs_url":"https://api.github.com/repos/makersacademy/airport_challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makersacademy/airport_challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makersacademy/airport_challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/makersacademy/airport_challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makersacademy/airport_challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/makersacademy/airport_challenge/languages","stargazers_url":"https://api.github.com/repos/makersacademy/airport_challenge/stargazers","contributors_url":"https://api.github.com/repos/makersacademy/airport_challenge/contributors","subscribers_url":"https://api.github.com/repos/makersacademy/airport_challenge/subscribers","subscription_url":"https://api.github.com/repos/makersacademy/airport_challenge/subscription","commits_url":"https://api.github.com/repos/makersacademy/airport_challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/makersacademy/airport_challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/makersacademy/airport_challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/makersacademy/airport_challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/makersacademy/airport_challenge/contents/{+path}","compare_url":"https://api.github.com/repos/makersacademy/airport_challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makersacademy/airport_challenge/merges","archive_url":"https://api.github.com/repos/makersacademy/airport_challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makersacademy/airport_challenge/downloads","issues_url":"https://api.github.com/repos/makersacademy/airport_challenge/issues{/number}","pulls_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/makersacademy/airport_challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/makersacademy/airport_challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makersacademy/airport_challenge/labels{/name}","releases_url":"https://api.github.com/repos/makersacademy/airport_challenge/releases{/id}","deployments_url":"https://api.github.com/repos/makersacademy/airport_challenge/deployments","created_at":"2014-11-24T12:30:39Z","updated_at":"2016-05-28T09:49:21Z","pushed_at":"2016-07-10T12:44:01Z","git_url":"git://github.com/makersacademy/airport_challenge.git","ssh_url":"git@github.com:makersacademy/airport_challenge.git","clone_url":"https://github.com/makersacademy/airport_challenge.git","svn_url":"https://github.com/makersacademy/airport_challenge","homepage":"","size":25465,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":418,"mirror_url":null,"open_issues_count":61,"forks":418,"open_issues":61,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459"},"html":{"href":"https://github.com/makersacademy/airport_challenge/pull/459"},"issue":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/issues/459"},"comments":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/issues/459/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459/comments"},"review_comment":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/459/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/statuses/cf563d9a2f9c7d4a1283495c9fee10745b605f7c"}}}}
{"actor":{"display_login":"houndci-bot"}}