{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments/50631501","id":50631501,"diff_hunk":"@@ -0,0 +1,138 @@\n+require 'air_traffic_control'\n+\n+describe AirTrafficControl do\n+  subject(:AirTrafficControl) {described_class.new}\n+\tlet(:plane) { double :plane }\n+  let(:airport) { double :airport }\n+\n+#responds to methods in class\n+  it { is_expected.to respond_to(:instruct_land).with(2).argument }\n+  it { is_expected.to respond_to(:instruct_takeoff).with(2).argument }\n+\n+#wrap in non-stormy weather/other condition\n+  describe 'stub main conditions for tests' do\n+    before do\n+      allow(AirTrafficControl).to receive(:stormy?).and_return(false)\n+      allow_any_instance_of(AirTrafficControl).to receive(:stormy?).and_return(false)\n+      allow(airport).to receive(:land)\n+      allow(airport).to receive(:takeoff)\n+      allow(airport).to receive(:full?).and_return(false)\n+      allow(AirTrafficControl).to receive(:airport_match).and_return(true)\n+      allow_any_instance_of(AirTrafficControl).to receive(:airport_match).and_return(true)\n+\n+    end\n+    describe 'stub landing conditions' do\n+      before do\n+        allow(AirTrafficControl).to receive(:airplane_status_check).and_return(false)\n+        allow_any_instance_of(AirTrafficControl).to receive(:airplane_status_check).and_return(false)\n+      end\n+      it 'check weather stubbed when called' do\n+        expect(subject.stormy?).to eq false\n+      end\n+\n+    #instruct a plane to land\n+      describe '#instruct_land' do\n+        it 'returns plane removed from inflight' do\n+          subject.instruct_takeoff(plane, airport)\n+          expect(subject.instruct_land(plane, airport)).to eq plane\n+        end\n+      end\n+\n+      describe '#instruct_land' do\n+        it 'check plane no longer inflight' do\n+          subject.instruct_takeoff(plane, airport)\n+          subject.instruct_land(plane, airport)\n+     \t    expect(subject.display_inflight).not_to include(plane)\n+        end\n+      end\n+\n+      describe '#instruct_land' do\n+        it 'check plane class receives instruction to land' do\n+          expect(airport).to receive(:land)\n+          subject.instruct_land(plane, airport)\n+        end\n+      end\n+\n+    #prevent landing if airport is full\n+      describe '#instruct_land' do\n+        it 'display error if airport is full' do\n+          allow(airport).to receive(:full?).and_return(true)\n+          expect { subject.instruct_land(plane, airport) }.to raise_error('Airport is full')\n+        end\n+      end\n+\n+      describe '#instruct_land' do\n+        it 'check airport class for full?' do\n+          expect(airport).to receive(:full?)\n+          subject.instruct_land(plane, airport)\n+        end\n+      end\n+\n+    #prevent landing if stormy\n+      describe '#instruct_land' do\n+        it 'display error if stormy' do\n+          allow(AirTrafficControl).to receive(:stormy?).and_return(true)\n+          allow_any_instance_of(AirTrafficControl).to receive(:stormy?).and_return(true)\n+          expect { subject.instruct_land(plane, airport) }.to raise_error('Too stormy to land')\n+        end\n+      end\n+\n+      describe'#instruct_land' do\n+        it 'error if plane already landed' do\n+          allow(AirTrafficControl).to receive(:airplane_status_check).and_return(true)","path":"spec/airport_control_spec.rb","position":82,"original_position":82,"commit_id":"cc3c247a868a4879cae71510e42a33d0f529f866","original_commit_id":"cc3c247a868a4879cae71510e42a33d0f529f866","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Metrics/LineLength: Line is too long. [86/80] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)","created_at":"2016-01-24T07:25:01Z","updated_at":"2016-01-24T07:25:01Z","html_url":"https://github.com/makersacademy/airport_challenge/pull/294#discussion_r50631501","pull_request_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/294","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments/50631501"},"html":{"href":"https://github.com/makersacademy/airport_challenge/pull/294#discussion_r50631501"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/294"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/294","id":56997342,"html_url":"https://github.com/makersacademy/airport_challenge/pull/294","diff_url":"https://github.com/makersacademy/airport_challenge/pull/294.diff","patch_url":"https://github.com/makersacademy/airport_challenge/pull/294.patch","issue_url":"https://api.github.com/repos/makersacademy/airport_challenge/issues/294","number":294,"state":"open","locked":false,"title":"Lou's week1 challenge","user":{"login":"innlouvate","id":8605248,"avatar_url":"https://avatars.githubusercontent.com/u/8605248?v=3","gravatar_id":"","url":"https://api.github.com/users/innlouvate","html_url":"https://github.com/innlouvate","followers_url":"https://api.github.com/users/innlouvate/followers","following_url":"https://api.github.com/users/innlouvate/following{/other_user}","gists_url":"https://api.github.com/users/innlouvate/gists{/gist_id}","starred_url":"https://api.github.com/users/innlouvate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innlouvate/subscriptions","organizations_url":"https://api.github.com/users/innlouvate/orgs","repos_url":"https://api.github.com/users/innlouvate/repos","events_url":"https://api.github.com/users/innlouvate/events{/privacy}","received_events_url":"https://api.github.com/users/innlouvate/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-24T07:24:56Z","updated_at":"2016-01-24T07:25:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f67f2e19a79d2902a53ac67e92a78b52d29f5c55","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/294/commits","review_comments_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/294/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/294/comments","statuses_url":"https://api.github.com/repos/makersacademy/airport_challenge/statuses/cc3c247a868a4879cae71510e42a33d0f529f866","head":{"label":"innlouvate:master","ref":"master","sha":"cc3c247a868a4879cae71510e42a33d0f529f866","user":{"login":"innlouvate","id":8605248,"avatar_url":"https://avatars.githubusercontent.com/u/8605248?v=3","gravatar_id":"","url":"https://api.github.com/users/innlouvate","html_url":"https://github.com/innlouvate","followers_url":"https://api.github.com/users/innlouvate/followers","following_url":"https://api.github.com/users/innlouvate/following{/other_user}","gists_url":"https://api.github.com/users/innlouvate/gists{/gist_id}","starred_url":"https://api.github.com/users/innlouvate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innlouvate/subscriptions","organizations_url":"https://api.github.com/users/innlouvate/orgs","repos_url":"https://api.github.com/users/innlouvate/repos","events_url":"https://api.github.com/users/innlouvate/events{/privacy}","received_events_url":"https://api.github.com/users/innlouvate/received_events","type":"User","site_admin":false},"repo":{"id":50197546,"name":"airport_challenge","full_name":"innlouvate/airport_challenge","owner":{"login":"innlouvate","id":8605248,"avatar_url":"https://avatars.githubusercontent.com/u/8605248?v=3","gravatar_id":"","url":"https://api.github.com/users/innlouvate","html_url":"https://github.com/innlouvate","followers_url":"https://api.github.com/users/innlouvate/followers","following_url":"https://api.github.com/users/innlouvate/following{/other_user}","gists_url":"https://api.github.com/users/innlouvate/gists{/gist_id}","starred_url":"https://api.github.com/users/innlouvate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innlouvate/subscriptions","organizations_url":"https://api.github.com/users/innlouvate/orgs","repos_url":"https://api.github.com/users/innlouvate/repos","events_url":"https://api.github.com/users/innlouvate/events{/privacy}","received_events_url":"https://api.github.com/users/innlouvate/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/innlouvate/airport_challenge","description":"Fly!","fork":true,"url":"https://api.github.com/repos/innlouvate/airport_challenge","forks_url":"https://api.github.com/repos/innlouvate/airport_challenge/forks","keys_url":"https://api.github.com/repos/innlouvate/airport_challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/innlouvate/airport_challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/innlouvate/airport_challenge/teams","hooks_url":"https://api.github.com/repos/innlouvate/airport_challenge/hooks","issue_events_url":"https://api.github.com/repos/innlouvate/airport_challenge/issues/events{/number}","events_url":"https://api.github.com/repos/innlouvate/airport_challenge/events","assignees_url":"https://api.github.com/repos/innlouvate/airport_challenge/assignees{/user}","branches_url":"https://api.github.com/repos/innlouvate/airport_challenge/branches{/branch}","tags_url":"https://api.github.com/repos/innlouvate/airport_challenge/tags","blobs_url":"https://api.github.com/repos/innlouvate/airport_challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/innlouvate/airport_challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/innlouvate/airport_challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/innlouvate/airport_challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/innlouvate/airport_challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/innlouvate/airport_challenge/languages","stargazers_url":"https://api.github.com/repos/innlouvate/airport_challenge/stargazers","contributors_url":"https://api.github.com/repos/innlouvate/airport_challenge/contributors","subscribers_url":"https://api.github.com/repos/innlouvate/airport_challenge/subscribers","subscription_url":"https://api.github.com/repos/innlouvate/airport_challenge/subscription","commits_url":"https://api.github.com/repos/innlouvate/airport_challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/innlouvate/airport_challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/innlouvate/airport_challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/innlouvate/airport_challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/innlouvate/airport_challenge/contents/{+path}","compare_url":"https://api.github.com/repos/innlouvate/airport_challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/innlouvate/airport_challenge/merges","archive_url":"https://api.github.com/repos/innlouvate/airport_challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/innlouvate/airport_challenge/downloads","issues_url":"https://api.github.com/repos/innlouvate/airport_challenge/issues{/number}","pulls_url":"https://api.github.com/repos/innlouvate/airport_challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/innlouvate/airport_challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/innlouvate/airport_challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/innlouvate/airport_challenge/labels{/name}","releases_url":"https://api.github.com/repos/innlouvate/airport_challenge/releases{/id}","deployments_url":"https://api.github.com/repos/innlouvate/airport_challenge/deployments","created_at":"2016-01-22T17:49:54Z","updated_at":"2016-01-22T17:49:54Z","pushed_at":"2016-01-24T07:22:50Z","git_url":"git://github.com/innlouvate/airport_challenge.git","ssh_url":"git@github.com:innlouvate/airport_challenge.git","clone_url":"https://github.com/innlouvate/airport_challenge.git","svn_url":"https://github.com/innlouvate/airport_challenge","homepage":"","size":99,"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":"3b2a5e2f27aa371bdcb3bc6c79d96cf1aee77e4b","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-01-22T15:59:04Z","pushed_at":"2016-01-24T07:24:56Z","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":19895,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":265,"mirror_url":null,"open_issues_count":54,"forks":265,"open_issues":54,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/294"},"html":{"href":"https://github.com/makersacademy/airport_challenge/pull/294"},"issue":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/issues/294"},"comments":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/issues/294/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/294/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/294/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/statuses/cc3c247a868a4879cae71510e42a33d0f529f866"}}}}