{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments/50644249","id":50644249,"diff_hunk":"@@ -0,0 +1,133 @@\n+require 'plane'\n+\n+describe Plane do\n+  let(:airport) { double( :airport,\n+                          :stormy? => false,\n+                          :outbound => nil) }\n+  let(:destination) { double( :airport,\n+                              :stormy? => false,\n+                              :method_defined? => true) }\n+  subject(:plane) { described_class.new(airport) }\n+\n+  describe '#initialize' do\n+    it 'initializes at the specified airport' do\n+      expect(plane.location).to eq \"#{airport}\"\n+    end\n+\n+    it 'initializes a plane that is not in flight' do\n+      expect(plane.in_flight?).to be_falsy\n+    end\n+  end\n+\n+  describe '#land_at' do\n+    it { is_expected.to respond_to(:land_at).with(1).argument }\n+\n+    # NOTE: see note in #land_at --- testing for #code?\n+    context 'when passed a non-Airport argument' do\n+      let(:not_an_airport) { double(\"not an airport\", :method_defined? => false) }\n+      it 'raises an exception' do\n+        expect do\n+          plane.land_at(not_an_airport)\n+        end.to raise_exception(\"#{not_an_airport} is not a valid airport\")\n+      end\n+    end\n+\n+    context 'when the plane is not in flight' do\n+      it 'raises an exception' do\n+        expect do\n+          plane.land_at destination\n+        end.to raise_exception(\"Plane is not in flight!\")\n+      end\n+    end\n+\n+    context 'when the plane is in flight' do\n+      it 'lands at an airport and confirms' do\n+        expect(airport).to receive(:outbound) { plane }\n+        plane.take_off\n+        expect(destination).to receive(:inbound) { plane }\n+        expect(plane).to receive(:new_location) { destination }\n+        expect(plane.land_at destination).to be_truthy\n+      end\n+\n+      it 'raises exception and does not land if destination weather is stormy' do\n+        allow(destination).to receive(:stormy?) { true }\n+        plane.take_off\n+        expect do\n+          plane.land_at destination\n+        end.to raise_exception(\"Unable to land at #{destination} due to stormy weather\")\n+        expect(plane.in_flight?).to be_truthy\n+      end\n+    end\n+  end\n+\n+  describe '#take_off' do\n+    it { is_expected.to respond_to(:take_off).with(0).arguments }\n+\n+    context 'when the plane is in flight' do\n+      it 'raises an exception' do\n+        plane.take_off\n+        expect do\n+          plane.take_off\n+        end.to raise_exception(\"Plane is in flight!\")\n+      end\n+    end\n+\n+    context 'when the plane is stationed at an airport' do\n+      it 'takes off from the airport and confirms' do\n+        expect(airport).to receive(:outbound) { plane }\n+        expect(plane).to receive(:new_location) { nil }\n+        expect(plane.take_off).to be_truthy\n+      end\n+\n+      it 'raises an exception if weather is stormy' do\n+        allow(airport).to receive(:stormy?) { true }\n+        expect do\n+          plane.take_off\n+        end.to raise_exception(\"Unable to take off in stormy weather\")\n+      end\n+\n+      it 'sets plane state to in_flight' do\n+        expect(airport).to receive(:outbound) { plane }\n+        plane.take_off\n+        expect(plane.in_flight?).to be_truthy\n+      end\n+    end\n+  end\n+\n+  describe '#location' do\n+    context 'when plane is stationed at an airport' do\n+      it 'returns the airport code' do\n+        # allow(airport).to receive(:to_s) { \"LAX\" }\n+        expect(plane.location).to eq \"#{airport}\"","path":"spec/plane_spec.rb","position":101,"original_position":101,"commit_id":"f4b9446dc93c897d0e7236676746ddde4e8fbd81","original_commit_id":"f4b9446dc93c897d0e7236676746ddde4e8fbd81","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":"Style/UnneededInterpolation: Prefer `to_s` over string interpolation.","created_at":"2016-01-24T22:58:25Z","updated_at":"2016-01-24T22:58:25Z","html_url":"https://github.com/makersacademy/airport_challenge/pull/298#discussion_r50644249","pull_request_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/298","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/comments/50644249"},"html":{"href":"https://github.com/makersacademy/airport_challenge/pull/298#discussion_r50644249"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/298"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/298","id":57000199,"html_url":"https://github.com/makersacademy/airport_challenge/pull/298","diff_url":"https://github.com/makersacademy/airport_challenge/pull/298.diff","patch_url":"https://github.com/makersacademy/airport_challenge/pull/298.patch","issue_url":"https://api.github.com/repos/makersacademy/airport_challenge/issues/298","number":298,"state":"open","locked":false,"title":"Mic's pull request","user":{"login":"mic-css","id":4118081,"avatar_url":"https://avatars.githubusercontent.com/u/4118081?v=3","gravatar_id":"","url":"https://api.github.com/users/mic-css","html_url":"https://github.com/mic-css","followers_url":"https://api.github.com/users/mic-css/followers","following_url":"https://api.github.com/users/mic-css/following{/other_user}","gists_url":"https://api.github.com/users/mic-css/gists{/gist_id}","starred_url":"https://api.github.com/users/mic-css/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mic-css/subscriptions","organizations_url":"https://api.github.com/users/mic-css/orgs","repos_url":"https://api.github.com/users/mic-css/repos","events_url":"https://api.github.com/users/mic-css/events{/privacy}","received_events_url":"https://api.github.com/users/mic-css/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-24T10:33:04Z","updated_at":"2016-01-24T22:58:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f4bd94b6f1e3d36a3e3c2cf40076ab4cd64f091","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/298/commits","review_comments_url":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/298/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/298/comments","statuses_url":"https://api.github.com/repos/makersacademy/airport_challenge/statuses/f4b9446dc93c897d0e7236676746ddde4e8fbd81","head":{"label":"mic-css:master","ref":"master","sha":"f4b9446dc93c897d0e7236676746ddde4e8fbd81","user":{"login":"mic-css","id":4118081,"avatar_url":"https://avatars.githubusercontent.com/u/4118081?v=3","gravatar_id":"","url":"https://api.github.com/users/mic-css","html_url":"https://github.com/mic-css","followers_url":"https://api.github.com/users/mic-css/followers","following_url":"https://api.github.com/users/mic-css/following{/other_user}","gists_url":"https://api.github.com/users/mic-css/gists{/gist_id}","starred_url":"https://api.github.com/users/mic-css/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mic-css/subscriptions","organizations_url":"https://api.github.com/users/mic-css/orgs","repos_url":"https://api.github.com/users/mic-css/repos","events_url":"https://api.github.com/users/mic-css/events{/privacy}","received_events_url":"https://api.github.com/users/mic-css/received_events","type":"User","site_admin":false},"repo":{"id":50247839,"name":"airport_challenge","full_name":"mic-css/airport_challenge","owner":{"login":"mic-css","id":4118081,"avatar_url":"https://avatars.githubusercontent.com/u/4118081?v=3","gravatar_id":"","url":"https://api.github.com/users/mic-css","html_url":"https://github.com/mic-css","followers_url":"https://api.github.com/users/mic-css/followers","following_url":"https://api.github.com/users/mic-css/following{/other_user}","gists_url":"https://api.github.com/users/mic-css/gists{/gist_id}","starred_url":"https://api.github.com/users/mic-css/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mic-css/subscriptions","organizations_url":"https://api.github.com/users/mic-css/orgs","repos_url":"https://api.github.com/users/mic-css/repos","events_url":"https://api.github.com/users/mic-css/events{/privacy}","received_events_url":"https://api.github.com/users/mic-css/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mic-css/airport_challenge","description":"Fly!","fork":true,"url":"https://api.github.com/repos/mic-css/airport_challenge","forks_url":"https://api.github.com/repos/mic-css/airport_challenge/forks","keys_url":"https://api.github.com/repos/mic-css/airport_challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mic-css/airport_challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mic-css/airport_challenge/teams","hooks_url":"https://api.github.com/repos/mic-css/airport_challenge/hooks","issue_events_url":"https://api.github.com/repos/mic-css/airport_challenge/issues/events{/number}","events_url":"https://api.github.com/repos/mic-css/airport_challenge/events","assignees_url":"https://api.github.com/repos/mic-css/airport_challenge/assignees{/user}","branches_url":"https://api.github.com/repos/mic-css/airport_challenge/branches{/branch}","tags_url":"https://api.github.com/repos/mic-css/airport_challenge/tags","blobs_url":"https://api.github.com/repos/mic-css/airport_challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mic-css/airport_challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mic-css/airport_challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/mic-css/airport_challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mic-css/airport_challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/mic-css/airport_challenge/languages","stargazers_url":"https://api.github.com/repos/mic-css/airport_challenge/stargazers","contributors_url":"https://api.github.com/repos/mic-css/airport_challenge/contributors","subscribers_url":"https://api.github.com/repos/mic-css/airport_challenge/subscribers","subscription_url":"https://api.github.com/repos/mic-css/airport_challenge/subscription","commits_url":"https://api.github.com/repos/mic-css/airport_challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/mic-css/airport_challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/mic-css/airport_challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/mic-css/airport_challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/mic-css/airport_challenge/contents/{+path}","compare_url":"https://api.github.com/repos/mic-css/airport_challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mic-css/airport_challenge/merges","archive_url":"https://api.github.com/repos/mic-css/airport_challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mic-css/airport_challenge/downloads","issues_url":"https://api.github.com/repos/mic-css/airport_challenge/issues{/number}","pulls_url":"https://api.github.com/repos/mic-css/airport_challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/mic-css/airport_challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/mic-css/airport_challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mic-css/airport_challenge/labels{/name}","releases_url":"https://api.github.com/repos/mic-css/airport_challenge/releases{/id}","deployments_url":"https://api.github.com/repos/mic-css/airport_challenge/deployments","created_at":"2016-01-23T16:52:49Z","updated_at":"2016-01-23T16:52:50Z","pushed_at":"2016-01-24T22:58:21Z","git_url":"git://github.com/mic-css/airport_challenge.git","ssh_url":"git@github.com:mic-css/airport_challenge.git","clone_url":"https://github.com/mic-css/airport_challenge.git","svn_url":"https://github.com/mic-css/airport_challenge","homepage":"","size":106,"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-24T22:58:21Z","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":270,"mirror_url":null,"open_issues_count":78,"forks":270,"open_issues":78,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/298"},"html":{"href":"https://github.com/makersacademy/airport_challenge/pull/298"},"issue":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/issues/298"},"comments":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/pulls/298/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/298/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/airport_challenge/statuses/f4b9446dc93c897d0e7236676746ddde4e8fbd81"}}}}