{"action":"created","comment":{"url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/comments/47092293","id":47092293,"diff_hunk":"@@ -2,114 +2,117 @@\n \n # This test tests the functionality within\n # spree/core/controller_helpers/respond_with.rb\n-# Rather than duck-punching the existing controllers, let's define a custom one:\n-class Spree::CustomController < Spree::BaseController\n-  def index\n-    respond_with(Spree::Address.new) do |format|\n-      format.html { render :text => \"neutral\" }\n+# Rather than duck-punching the existing controllers,\n+# let's define a custom one:\n+module SpreeSpec\n+  class CustomController < Spree::BaseController\n+    def index\n+      respond_with(Spree::Address.new) do |format|\n+        format.html { render text: 'neutral' }\n+      end\n     end\n-  end\n \n-  def create\n-    # Just need a model with validations\n-    # Address is good enough, so let's go with that\n-    address = Spree::Address.new(params[:address])\n-    respond_with(address)\n-  end\n-end\n+    def create\n+      # Just need a model with validations\n+      # Address is good enough, so let's go with that\n+      address = Spree::Address.new(params[:address])\n+      respond_with(address)\n+    end\n+  end # CustomController\n+end # SpreeSpec\n \n-describe Spree::CustomController, :type => :controller do\n+describe SpreeSpec::CustomController, type: :controller do\n   after do\n-    Spree::CustomController.clear_overrides!\n+    SpreeSpec::CustomController.clear_overrides!\n   end\n \n-  context \"extension testing\" do\n-    context \"index\" do\n-      context \"specify symbol for handler instead of Proc\" do\n-        before do\n-          Spree::CustomController.class_eval do\n-            respond_override({:index => {:html => {:success => :success_method}}})\n+  context 'index' do\n+    context 'specify symbol for handler instead of Proc' do\n+      before do\n+        SpreeSpec::CustomController.class_eval do\n+          respond_override(index: { html: { success: :success_method }})\n \n-            private\n+        private\n \n-            def success_method\n-              render :text => 'success!!!'\n-            end\n-          end\n-        end\n-        describe \"GET\" do\n-          it \"has value success\" do\n-            spree_get :index\n-            expect(response).to be_success\n-            assert (response.body =~ /success!!!/)\n+          def success_method\n+            render(text: 'success!!!')\n           end\n         end\n       end\n \n-      context \"render\" do\n-        before do\n-          Spree::CustomController.instance_eval do\n-            respond_override({:index => {:html => {:success => lambda { render(:text => 'success!!!') }}}})\n-            respond_override({:index => {:html => {:failure => lambda { render(:text => 'failure!!!') }}}})\n-          end\n+      describe 'GET' do\n+        it 'responds successful' do\n+          spree_get(:index)\n+          expect(response.status).to eql(200)","path":"frontend/spec/controllers/controller_extension_spec.rb","position":83,"original_position":83,"commit_id":"4021f3211d45fbf0d266a61f191cabea7165705b","original_commit_id":"4021f3211d45fbf0d266a61f191cabea7165705b","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"body":"Initially I wanted to do a pass over all specs. But as I touched mostly the entire file I decided to fix all smells it contains instead.\r\n\r\nToo bad I missed `have_http_status`.\r\n\r\nWe really need a policy to limit the expansion of a single propose change into adjacent diffs, else we'll bike shedding too much on code bases like spree.\r\n\r\nOr we priorize global style fixes in the hope that there is no \"island hopping\" into too much adjacent diffs. For this file it might make sense to fix everything as we touched >90% but conceptually I feel we should cut the creep a bit.","created_at":"2015-12-09T13:54:13Z","updated_at":"2015-12-09T13:54:13Z","html_url":"https://github.com/MountainRoseHerbs/spree/pull/144#discussion_r47092293","pull_request_url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144","_links":{"self":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/comments/47092293"},"html":{"href":"https://github.com/MountainRoseHerbs/spree/pull/144#discussion_r47092293"},"pull_request":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144","id":52786448,"html_url":"https://github.com/MountainRoseHerbs/spree/pull/144","diff_url":"https://github.com/MountainRoseHerbs/spree/pull/144.diff","patch_url":"https://github.com/MountainRoseHerbs/spree/pull/144.patch","issue_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/144","number":144,"state":"open","locked":false,"title":"Factory validation as spec","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"body":"Extraction from #127 ","created_at":"2015-12-06T18:22:15Z","updated_at":"2015-12-09T13:54:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06b65e4ad2da393bdf60d74eb6787cd2405a8928","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144/commits","review_comments_url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144/comments","review_comment_url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/144/comments","statuses_url":"https://api.github.com/repos/MountainRoseHerbs/spree/statuses/4021f3211d45fbf0d266a61f191cabea7165705b","head":{"label":"MountainRoseHerbs:fix/factory-validation-as-spec","ref":"fix/factory-validation-as-spec","sha":"4021f3211d45fbf0d266a61f191cabea7165705b","user":{"login":"MountainRoseHerbs","id":2074141,"avatar_url":"https://avatars.githubusercontent.com/u/2074141?v=3","gravatar_id":"","url":"https://api.github.com/users/MountainRoseHerbs","html_url":"https://github.com/MountainRoseHerbs","followers_url":"https://api.github.com/users/MountainRoseHerbs/followers","following_url":"https://api.github.com/users/MountainRoseHerbs/following{/other_user}","gists_url":"https://api.github.com/users/MountainRoseHerbs/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainRoseHerbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainRoseHerbs/subscriptions","organizations_url":"https://api.github.com/users/MountainRoseHerbs/orgs","repos_url":"https://api.github.com/users/MountainRoseHerbs/repos","events_url":"https://api.github.com/users/MountainRoseHerbs/events{/privacy}","received_events_url":"https://api.github.com/users/MountainRoseHerbs/received_events","type":"Organization","site_admin":false},"repo":{"id":12473049,"name":"spree","full_name":"MountainRoseHerbs/spree","owner":{"login":"MountainRoseHerbs","id":2074141,"avatar_url":"https://avatars.githubusercontent.com/u/2074141?v=3","gravatar_id":"","url":"https://api.github.com/users/MountainRoseHerbs","html_url":"https://github.com/MountainRoseHerbs","followers_url":"https://api.github.com/users/MountainRoseHerbs/followers","following_url":"https://api.github.com/users/MountainRoseHerbs/following{/other_user}","gists_url":"https://api.github.com/users/MountainRoseHerbs/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainRoseHerbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainRoseHerbs/subscriptions","organizations_url":"https://api.github.com/users/MountainRoseHerbs/orgs","repos_url":"https://api.github.com/users/MountainRoseHerbs/repos","events_url":"https://api.github.com/users/MountainRoseHerbs/events{/privacy}","received_events_url":"https://api.github.com/users/MountainRoseHerbs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MountainRoseHerbs/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/MountainRoseHerbs/spree","forks_url":"https://api.github.com/repos/MountainRoseHerbs/spree/forks","keys_url":"https://api.github.com/repos/MountainRoseHerbs/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MountainRoseHerbs/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MountainRoseHerbs/spree/teams","hooks_url":"https://api.github.com/repos/MountainRoseHerbs/spree/hooks","issue_events_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/events{/number}","events_url":"https://api.github.com/repos/MountainRoseHerbs/spree/events","assignees_url":"https://api.github.com/repos/MountainRoseHerbs/spree/assignees{/user}","branches_url":"https://api.github.com/repos/MountainRoseHerbs/spree/branches{/branch}","tags_url":"https://api.github.com/repos/MountainRoseHerbs/spree/tags","blobs_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MountainRoseHerbs/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/MountainRoseHerbs/spree/languages","stargazers_url":"https://api.github.com/repos/MountainRoseHerbs/spree/stargazers","contributors_url":"https://api.github.com/repos/MountainRoseHerbs/spree/contributors","subscribers_url":"https://api.github.com/repos/MountainRoseHerbs/spree/subscribers","subscription_url":"https://api.github.com/repos/MountainRoseHerbs/spree/subscription","commits_url":"https://api.github.com/repos/MountainRoseHerbs/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/MountainRoseHerbs/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/MountainRoseHerbs/spree/contents/{+path}","compare_url":"https://api.github.com/repos/MountainRoseHerbs/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MountainRoseHerbs/spree/merges","archive_url":"https://api.github.com/repos/MountainRoseHerbs/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MountainRoseHerbs/spree/downloads","issues_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues{/number}","pulls_url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/MountainRoseHerbs/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/MountainRoseHerbs/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MountainRoseHerbs/spree/labels{/name}","releases_url":"https://api.github.com/repos/MountainRoseHerbs/spree/releases{/id}","created_at":"2013-08-29T22:58:09Z","updated_at":"2015-04-16T21:58:33Z","pushed_at":"2015-12-09T03:21:21Z","git_url":"git://github.com/MountainRoseHerbs/spree.git","ssh_url":"git@github.com:MountainRoseHerbs/spree.git","clone_url":"https://github.com/MountainRoseHerbs/spree.git","svn_url":"https://github.com/MountainRoseHerbs/spree","homepage":"http://spreecommerce.com","size":69397,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"base":{"label":"MountainRoseHerbs:master","ref":"master","sha":"6caba5138f0c678dea274215f81e0a7b35655177","user":{"login":"MountainRoseHerbs","id":2074141,"avatar_url":"https://avatars.githubusercontent.com/u/2074141?v=3","gravatar_id":"","url":"https://api.github.com/users/MountainRoseHerbs","html_url":"https://github.com/MountainRoseHerbs","followers_url":"https://api.github.com/users/MountainRoseHerbs/followers","following_url":"https://api.github.com/users/MountainRoseHerbs/following{/other_user}","gists_url":"https://api.github.com/users/MountainRoseHerbs/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainRoseHerbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainRoseHerbs/subscriptions","organizations_url":"https://api.github.com/users/MountainRoseHerbs/orgs","repos_url":"https://api.github.com/users/MountainRoseHerbs/repos","events_url":"https://api.github.com/users/MountainRoseHerbs/events{/privacy}","received_events_url":"https://api.github.com/users/MountainRoseHerbs/received_events","type":"Organization","site_admin":false},"repo":{"id":12473049,"name":"spree","full_name":"MountainRoseHerbs/spree","owner":{"login":"MountainRoseHerbs","id":2074141,"avatar_url":"https://avatars.githubusercontent.com/u/2074141?v=3","gravatar_id":"","url":"https://api.github.com/users/MountainRoseHerbs","html_url":"https://github.com/MountainRoseHerbs","followers_url":"https://api.github.com/users/MountainRoseHerbs/followers","following_url":"https://api.github.com/users/MountainRoseHerbs/following{/other_user}","gists_url":"https://api.github.com/users/MountainRoseHerbs/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainRoseHerbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainRoseHerbs/subscriptions","organizations_url":"https://api.github.com/users/MountainRoseHerbs/orgs","repos_url":"https://api.github.com/users/MountainRoseHerbs/repos","events_url":"https://api.github.com/users/MountainRoseHerbs/events{/privacy}","received_events_url":"https://api.github.com/users/MountainRoseHerbs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MountainRoseHerbs/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/MountainRoseHerbs/spree","forks_url":"https://api.github.com/repos/MountainRoseHerbs/spree/forks","keys_url":"https://api.github.com/repos/MountainRoseHerbs/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MountainRoseHerbs/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MountainRoseHerbs/spree/teams","hooks_url":"https://api.github.com/repos/MountainRoseHerbs/spree/hooks","issue_events_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/events{/number}","events_url":"https://api.github.com/repos/MountainRoseHerbs/spree/events","assignees_url":"https://api.github.com/repos/MountainRoseHerbs/spree/assignees{/user}","branches_url":"https://api.github.com/repos/MountainRoseHerbs/spree/branches{/branch}","tags_url":"https://api.github.com/repos/MountainRoseHerbs/spree/tags","blobs_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MountainRoseHerbs/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/MountainRoseHerbs/spree/languages","stargazers_url":"https://api.github.com/repos/MountainRoseHerbs/spree/stargazers","contributors_url":"https://api.github.com/repos/MountainRoseHerbs/spree/contributors","subscribers_url":"https://api.github.com/repos/MountainRoseHerbs/spree/subscribers","subscription_url":"https://api.github.com/repos/MountainRoseHerbs/spree/subscription","commits_url":"https://api.github.com/repos/MountainRoseHerbs/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/MountainRoseHerbs/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/MountainRoseHerbs/spree/contents/{+path}","compare_url":"https://api.github.com/repos/MountainRoseHerbs/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MountainRoseHerbs/spree/merges","archive_url":"https://api.github.com/repos/MountainRoseHerbs/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MountainRoseHerbs/spree/downloads","issues_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues{/number}","pulls_url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/MountainRoseHerbs/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/MountainRoseHerbs/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MountainRoseHerbs/spree/labels{/name}","releases_url":"https://api.github.com/repos/MountainRoseHerbs/spree/releases{/id}","created_at":"2013-08-29T22:58:09Z","updated_at":"2015-04-16T21:58:33Z","pushed_at":"2015-12-09T03:21:21Z","git_url":"git://github.com/MountainRoseHerbs/spree.git","ssh_url":"git@github.com:MountainRoseHerbs/spree.git","clone_url":"https://github.com/MountainRoseHerbs/spree.git","svn_url":"https://github.com/MountainRoseHerbs/spree","homepage":"http://spreecommerce.com","size":69397,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144"},"html":{"href":"https://github.com/MountainRoseHerbs/spree/pull/144"},"issue":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/144"},"comments":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/MountainRoseHerbs/spree/statuses/4021f3211d45fbf0d266a61f191cabea7165705b"}}}}