{"action":"created","comment":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments/29981928","id":29981928,"diff_hunk":"@@ -18,46 +17,124 @@ module Alchemy\n     end\n \n     describe \"#grouped_elements_for_select\" do\n-      let(:elements) {\n+      let(:elements) do\n         [\n           mock_model('Element', name: '1', display_name: '1'),\n           mock_model('Element', name: '2', display_name: '2')\n         ]\n-      }\n+      end\n+      let(:element_definitions) { [{\"name\" => \"1\"}, {\"name\" => \"2\"}] }\n+      let(:cell_definitions) { [] }\n+      let(:page_definition) { {} }\n \n       before do\n-        allow(page).to receive(:layout_description).and_return({\n-          'name' => \"foo\",\n-          'cells' => [\"foo_cell\"]\n-        })\n-        cell_descriptions = [{\n-          'name' => \"foo_cell\",\n-          'elements' => [\"1\", \"2\"]\n-        }]\n-        allow(Cell).to receive(:definitions).and_return(cell_descriptions)\n+        allow(page).to receive(:definition).and_return(page_definition)\n+        allow(Cell).to receive(:definitions).and_return(cell_definitions)\n+        allow(Element).to receive(:definitions).and_return(element_definitions)\n         helper.instance_variable_set('@page', page)\n       end\n \n-      it \"should return array of elements grouped by cell for select_tag helper\" do\n-        expect(helper.grouped_elements_for_select(elements)).to include(\"Foo cell\" => [[\"1\", \"1#foo_cell\"], [\"2\", \"2#foo_cell\"]])\n+      context \"with empty elements array given\" do\n+        it \"return an empty array\" do\n+          expect(helper.grouped_elements_for_select([])).to eq([])\n+        end\n       end\n \n-      context \"with empty elements array\" do\n-        it \"should return an empty string\" do\n-          expect(helper.grouped_elements_for_select([])).to eq(\"\")\n+      context \"with an element collection given\" do\n+        let(:page_definition) do\n+          {'name' => \"foo\", 'cells' => [\"foo_cell\"], 'elements' => []}\n         end\n-      end\n \n-      context \"with empty cell definitions\" do\n-        it \"should return an empty string\" do\n-          allow(page).to receive(:layout_description).and_return({'name' => \"foo\"})\n-          expect(helper.grouped_elements_for_select(elements)).to eq(\"\")\n+        let(:cell_definitions) do\n+          [{'name' => \"foo_cell\", 'elements' => [\"1\", \"2\"]}]\n+        end\n+\n+        it \"returns an array of elements grouped by cell for select_tag helper\" do\n+          expect(helper.grouped_elements_for_select(elements)).to eq(\"Foo cell\" => [[\"1\", \"1#foo_cell\"], [\"2\", \"2#foo_cell\"]])","path":"spec/helpers/admin/elements_helper_spec.rb","position":66,"original_position":66,"commit_id":"2d36c51578ed378c31d4f31d2f84442f516d9405","original_commit_id":"2d36c51578ed378c31d4f31d2f84442f516d9405","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":"Line is too long. [126/100]","created_at":"2015-05-08T22:26:09Z","updated_at":"2015-05-08T22:26:09Z","html_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/773#discussion_r29981928","pull_request_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773","_links":{"self":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments/29981928"},"html":{"href":"https://github.com/AlchemyCMS/alchemy_cms/pull/773#discussion_r29981928"},"pull_request":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773"}}},"pull_request":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773","id":34768653,"html_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/773","diff_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/773.diff","patch_url":"https://github.com/AlchemyCMS/alchemy_cms/pull/773.patch","issue_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/773","number":773,"state":"open","locked":false,"title":"Fixes #753","user":{"login":"robinboening","id":342977,"avatar_url":"https://avatars.githubusercontent.com/u/342977?v=3","gravatar_id":"","url":"https://api.github.com/users/robinboening","html_url":"https://github.com/robinboening","followers_url":"https://api.github.com/users/robinboening/followers","following_url":"https://api.github.com/users/robinboening/following{/other_user}","gists_url":"https://api.github.com/users/robinboening/gists{/gist_id}","starred_url":"https://api.github.com/users/robinboening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinboening/subscriptions","organizations_url":"https://api.github.com/users/robinboening/orgs","repos_url":"https://api.github.com/users/robinboening/repos","events_url":"https://api.github.com/users/robinboening/events{/privacy}","received_events_url":"https://api.github.com/users/robinboening/received_events","type":"User","site_admin":false},"body":"Adds possibility to use same element in cell and main content.","created_at":"2015-05-05T21:23:15Z","updated_at":"2015-05-08T22:26:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffeb7b6b25789fac950d3e9e131de4a8aee0bd54","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773/commits","review_comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773/comments","review_comment_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/773/comments","statuses_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/2d36c51578ed378c31d4f31d2f84442f516d9405","head":{"label":"robinboening:master","ref":"master","sha":"2d36c51578ed378c31d4f31d2f84442f516d9405","user":{"login":"robinboening","id":342977,"avatar_url":"https://avatars.githubusercontent.com/u/342977?v=3","gravatar_id":"","url":"https://api.github.com/users/robinboening","html_url":"https://github.com/robinboening","followers_url":"https://api.github.com/users/robinboening/followers","following_url":"https://api.github.com/users/robinboening/following{/other_user}","gists_url":"https://api.github.com/users/robinboening/gists{/gist_id}","starred_url":"https://api.github.com/users/robinboening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinboening/subscriptions","organizations_url":"https://api.github.com/users/robinboening/orgs","repos_url":"https://api.github.com/users/robinboening/repos","events_url":"https://api.github.com/users/robinboening/events{/privacy}","received_events_url":"https://api.github.com/users/robinboening/received_events","type":"User","site_admin":false},"repo":{"id":6602558,"name":"alchemy_cms","full_name":"robinboening/alchemy_cms","owner":{"login":"robinboening","id":342977,"avatar_url":"https://avatars.githubusercontent.com/u/342977?v=3","gravatar_id":"","url":"https://api.github.com/users/robinboening","html_url":"https://github.com/robinboening","followers_url":"https://api.github.com/users/robinboening/followers","following_url":"https://api.github.com/users/robinboening/following{/other_user}","gists_url":"https://api.github.com/users/robinboening/gists{/gist_id}","starred_url":"https://api.github.com/users/robinboening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinboening/subscriptions","organizations_url":"https://api.github.com/users/robinboening/orgs","repos_url":"https://api.github.com/users/robinboening/repos","events_url":"https://api.github.com/users/robinboening/events{/privacy}","received_events_url":"https://api.github.com/users/robinboening/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robinboening/alchemy_cms","description":"Alchemy is the most flexible Rails CMS","fork":true,"url":"https://api.github.com/repos/robinboening/alchemy_cms","forks_url":"https://api.github.com/repos/robinboening/alchemy_cms/forks","keys_url":"https://api.github.com/repos/robinboening/alchemy_cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robinboening/alchemy_cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robinboening/alchemy_cms/teams","hooks_url":"https://api.github.com/repos/robinboening/alchemy_cms/hooks","issue_events_url":"https://api.github.com/repos/robinboening/alchemy_cms/issues/events{/number}","events_url":"https://api.github.com/repos/robinboening/alchemy_cms/events","assignees_url":"https://api.github.com/repos/robinboening/alchemy_cms/assignees{/user}","branches_url":"https://api.github.com/repos/robinboening/alchemy_cms/branches{/branch}","tags_url":"https://api.github.com/repos/robinboening/alchemy_cms/tags","blobs_url":"https://api.github.com/repos/robinboening/alchemy_cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robinboening/alchemy_cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robinboening/alchemy_cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/robinboening/alchemy_cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robinboening/alchemy_cms/statuses/{sha}","languages_url":"https://api.github.com/repos/robinboening/alchemy_cms/languages","stargazers_url":"https://api.github.com/repos/robinboening/alchemy_cms/stargazers","contributors_url":"https://api.github.com/repos/robinboening/alchemy_cms/contributors","subscribers_url":"https://api.github.com/repos/robinboening/alchemy_cms/subscribers","subscription_url":"https://api.github.com/repos/robinboening/alchemy_cms/subscription","commits_url":"https://api.github.com/repos/robinboening/alchemy_cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/robinboening/alchemy_cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/robinboening/alchemy_cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/robinboening/alchemy_cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/robinboening/alchemy_cms/contents/{+path}","compare_url":"https://api.github.com/repos/robinboening/alchemy_cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robinboening/alchemy_cms/merges","archive_url":"https://api.github.com/repos/robinboening/alchemy_cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robinboening/alchemy_cms/downloads","issues_url":"https://api.github.com/repos/robinboening/alchemy_cms/issues{/number}","pulls_url":"https://api.github.com/repos/robinboening/alchemy_cms/pulls{/number}","milestones_url":"https://api.github.com/repos/robinboening/alchemy_cms/milestones{/number}","notifications_url":"https://api.github.com/repos/robinboening/alchemy_cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robinboening/alchemy_cms/labels{/name}","releases_url":"https://api.github.com/repos/robinboening/alchemy_cms/releases{/id}","created_at":"2012-11-08T20:16:48Z","updated_at":"2015-05-05T21:44:25Z","pushed_at":"2015-05-08T22:25:52Z","git_url":"git://github.com/robinboening/alchemy_cms.git","ssh_url":"git@github.com:robinboening/alchemy_cms.git","clone_url":"https://github.com/robinboening/alchemy_cms.git","svn_url":"https://github.com/robinboening/alchemy_cms","homepage":"http://alchemy-cms.com","size":15197,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"AlchemyCMS:master","ref":"master","sha":"66db3eb663a3b0d3c93b4d33b102cf30c8571697","user":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":1581769,"name":"alchemy_cms","full_name":"AlchemyCMS/alchemy_cms","owner":{"login":"AlchemyCMS","id":6218554,"avatar_url":"https://avatars.githubusercontent.com/u/6218554?v=3","gravatar_id":"","url":"https://api.github.com/users/AlchemyCMS","html_url":"https://github.com/AlchemyCMS","followers_url":"https://api.github.com/users/AlchemyCMS/followers","following_url":"https://api.github.com/users/AlchemyCMS/following{/other_user}","gists_url":"https://api.github.com/users/AlchemyCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlchemyCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlchemyCMS/subscriptions","organizations_url":"https://api.github.com/users/AlchemyCMS/orgs","repos_url":"https://api.github.com/users/AlchemyCMS/repos","events_url":"https://api.github.com/users/AlchemyCMS/events{/privacy}","received_events_url":"https://api.github.com/users/AlchemyCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AlchemyCMS/alchemy_cms","description":"Alchemy is a powerful, flexible and user centric Rails CMS.","fork":false,"url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms","forks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/forks","keys_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/teams","hooks_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/hooks","issue_events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/events{/number}","events_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/events","assignees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/assignees{/user}","branches_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/branches{/branch}","tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/tags","blobs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/{sha}","languages_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/languages","stargazers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/stargazers","contributors_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contributors","subscribers_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscribers","subscription_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/subscription","commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/contents/{+path}","compare_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/merges","archive_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/downloads","issues_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues{/number}","pulls_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls{/number}","milestones_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/milestones{/number}","notifications_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/labels{/name}","releases_url":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/releases{/id}","created_at":"2011-04-07T10:37:01Z","updated_at":"2015-05-06T20:07:13Z","pushed_at":"2015-05-08T22:25:53Z","git_url":"git://github.com/AlchemyCMS/alchemy_cms.git","ssh_url":"git@github.com:AlchemyCMS/alchemy_cms.git","clone_url":"https://github.com/AlchemyCMS/alchemy_cms.git","svn_url":"https://github.com/AlchemyCMS/alchemy_cms","homepage":"http://alchemy-cms.com","size":21360,"stargazers_count":297,"watchers_count":297,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":140,"mirror_url":null,"open_issues_count":18,"forks":140,"open_issues":18,"watchers":297,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773"},"html":{"href":"https://github.com/AlchemyCMS/alchemy_cms/pull/773"},"issue":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/773"},"comments":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/issues/773/comments"},"review_comments":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773/comments"},"review_comment":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/pulls/773/commits"},"statuses":{"href":"https://api.github.com/repos/AlchemyCMS/alchemy_cms/statuses/2d36c51578ed378c31d4f31d2f84442f516d9405"}}}}