{"action":"created","comment":{"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/comments/54391805","id":54391805,"diff_hunk":"@@ -49,15 +49,74 @@\n     ActsAsTaggableOn.remove_unused_tags = previous_setting\n   end\n \n-  pending 'context scopes' do\n-    describe '.by_context'\n-\n-    describe '.by_contexts'\n-\n-    describe '.owned_by'\n-\n-    describe '.not_owned'\n-\n+  describe 'context scopes' do\n+    before do\n+      @tagging_2 = ActsAsTaggableOn::Tagging.new\n+      @tagging_3 = ActsAsTaggableOn::Tagging.new\n+\n+      @tagger = User.new\n+      @tagger_2 = User.new\n+\n+      @tagging.taggable = TaggableModel.create(name: \"Black holes\")\n+      @tagging.tag = ActsAsTaggableOn::Tag.create(name: \"Physics\")\n+      @tagging.tagger = @tagger\n+      @tagging.context = 'Science'\n+      @tagging.save\n+\n+      @tagging_2.taggable = TaggableModel.create(name: \"Satellites\")\n+      @tagging_2.tag = ActsAsTaggableOn::Tag.create(name: \"Technology\")\n+      @tagging_2.tagger = @tagger_2\n+      @tagging_2.context = 'Science'\n+      @tagging_2.save\n+\n+      @tagging_3.taggable = TaggableModel.create(name: \"Satellites\")\n+      @tagging_3.tag = ActsAsTaggableOn::Tag.create(name: \"Engineering\")\n+      @tagging_3.tagger = @tagger_2\n+      @tagging_3.context = 'Astronomy'\n+      @tagging_3.save\n+\n+    end\n+\n+    describe '.owned_by' do\n+      it \"should belong to a specific user\" do\n+        expect(@tagging).to be_valid\n+        expect(@tagging_2).to be_valid\n+\n+        expect(ActsAsTaggableOn::Tagging.owned_by(@tagger).first).to eq(@tagging)","path":"spec/acts_as_taggable_on/tagging_spec.rb","position":46,"original_position":46,"commit_id":"f8d0982b98af2bf6c385a1aa2e441b685940d355","original_commit_id":"f8d0982b98af2bf6c385a1aa2e441b685940d355","user":{"login":"dmgarland","id":133712,"avatar_url":"https://avatars.githubusercontent.com/u/133712?v=3","gravatar_id":"","url":"https://api.github.com/users/dmgarland","html_url":"https://github.com/dmgarland","followers_url":"https://api.github.com/users/dmgarland/followers","following_url":"https://api.github.com/users/dmgarland/following{/other_user}","gists_url":"https://api.github.com/users/dmgarland/gists{/gist_id}","starred_url":"https://api.github.com/users/dmgarland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmgarland/subscriptions","organizations_url":"https://api.github.com/users/dmgarland/orgs","repos_url":"https://api.github.com/users/dmgarland/repos","events_url":"https://api.github.com/users/dmgarland/events{/privacy}","received_events_url":"https://api.github.com/users/dmgarland/received_events","type":"User","site_admin":false},"body":"I think it would suffice to check only one permutation here... ","created_at":"2016-02-29T10:24:05Z","updated_at":"2016-02-29T10:24:05Z","html_url":"https://github.com/mbleigh/acts-as-taggable-on/pull/734#discussion_r54391805","pull_request_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734","_links":{"self":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/comments/54391805"},"html":{"href":"https://github.com/mbleigh/acts-as-taggable-on/pull/734#discussion_r54391805"},"pull_request":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734"}}},"pull_request":{"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734","id":59782707,"html_url":"https://github.com/mbleigh/acts-as-taggable-on/pull/734","diff_url":"https://github.com/mbleigh/acts-as-taggable-on/pull/734.diff","patch_url":"https://github.com/mbleigh/acts-as-taggable-on/pull/734.patch","issue_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/734","number":734,"state":"open","locked":false,"title":"Add rspec tests to tagging_spec ","user":{"login":"pcupueran","id":3464100,"avatar_url":"https://avatars.githubusercontent.com/u/3464100?v=3","gravatar_id":"","url":"https://api.github.com/users/pcupueran","html_url":"https://github.com/pcupueran","followers_url":"https://api.github.com/users/pcupueran/followers","following_url":"https://api.github.com/users/pcupueran/following{/other_user}","gists_url":"https://api.github.com/users/pcupueran/gists{/gist_id}","starred_url":"https://api.github.com/users/pcupueran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcupueran/subscriptions","organizations_url":"https://api.github.com/users/pcupueran/orgs","repos_url":"https://api.github.com/users/pcupueran/repos","events_url":"https://api.github.com/users/pcupueran/events{/privacy}","received_events_url":"https://api.github.com/users/pcupueran/received_events","type":"User","site_admin":false},"body":"I completed the test that were pending in the tagging_spec file. This helps to maintain the code.","created_at":"2016-02-18T11:03:47Z","updated_at":"2016-02-29T10:24:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d65e826c81dca37e86683606ae313594e6b7732","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734/commits","review_comments_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734/comments","review_comment_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/734/comments","statuses_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/statuses/f8d0982b98af2bf6c385a1aa2e441b685940d355","head":{"label":"pcupueran:master","ref":"master","sha":"f8d0982b98af2bf6c385a1aa2e441b685940d355","user":{"login":"pcupueran","id":3464100,"avatar_url":"https://avatars.githubusercontent.com/u/3464100?v=3","gravatar_id":"","url":"https://api.github.com/users/pcupueran","html_url":"https://github.com/pcupueran","followers_url":"https://api.github.com/users/pcupueran/followers","following_url":"https://api.github.com/users/pcupueran/following{/other_user}","gists_url":"https://api.github.com/users/pcupueran/gists{/gist_id}","starred_url":"https://api.github.com/users/pcupueran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcupueran/subscriptions","organizations_url":"https://api.github.com/users/pcupueran/orgs","repos_url":"https://api.github.com/users/pcupueran/repos","events_url":"https://api.github.com/users/pcupueran/events{/privacy}","received_events_url":"https://api.github.com/users/pcupueran/received_events","type":"User","site_admin":false},"repo":{"id":51920958,"name":"acts-as-taggable-on","full_name":"pcupueran/acts-as-taggable-on","owner":{"login":"pcupueran","id":3464100,"avatar_url":"https://avatars.githubusercontent.com/u/3464100?v=3","gravatar_id":"","url":"https://api.github.com/users/pcupueran","html_url":"https://github.com/pcupueran","followers_url":"https://api.github.com/users/pcupueran/followers","following_url":"https://api.github.com/users/pcupueran/following{/other_user}","gists_url":"https://api.github.com/users/pcupueran/gists{/gist_id}","starred_url":"https://api.github.com/users/pcupueran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcupueran/subscriptions","organizations_url":"https://api.github.com/users/pcupueran/orgs","repos_url":"https://api.github.com/users/pcupueran/repos","events_url":"https://api.github.com/users/pcupueran/events{/privacy}","received_events_url":"https://api.github.com/users/pcupueran/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcupueran/acts-as-taggable-on","description":"A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.","fork":true,"url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on","forks_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/forks","keys_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/teams","hooks_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/hooks","issue_events_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/issues/events{/number}","events_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/events","assignees_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/assignees{/user}","branches_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/branches{/branch}","tags_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/tags","blobs_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/statuses/{sha}","languages_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/languages","stargazers_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/stargazers","contributors_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/contributors","subscribers_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/subscribers","subscription_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/subscription","commits_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/contents/{+path}","compare_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/merges","archive_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/downloads","issues_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/issues{/number}","pulls_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/pulls{/number}","milestones_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/milestones{/number}","notifications_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/labels{/name}","releases_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/releases{/id}","deployments_url":"https://api.github.com/repos/pcupueran/acts-as-taggable-on/deployments","created_at":"2016-02-17T12:27:52Z","updated_at":"2016-02-17T12:27:53Z","pushed_at":"2016-02-24T12:33:09Z","git_url":"git://github.com/pcupueran/acts-as-taggable-on.git","ssh_url":"git@github.com:pcupueran/acts-as-taggable-on.git","clone_url":"https://github.com/pcupueran/acts-as-taggable-on.git","svn_url":"https://github.com/pcupueran/acts-as-taggable-on","homepage":"http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on","size":1183,"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":"mbleigh:master","ref":"master","sha":"b00a615495909dec179c8430fb3d27a4dcecfca3","user":{"login":"mbleigh","id":1022,"avatar_url":"https://avatars.githubusercontent.com/u/1022?v=3","gravatar_id":"","url":"https://api.github.com/users/mbleigh","html_url":"https://github.com/mbleigh","followers_url":"https://api.github.com/users/mbleigh/followers","following_url":"https://api.github.com/users/mbleigh/following{/other_user}","gists_url":"https://api.github.com/users/mbleigh/gists{/gist_id}","starred_url":"https://api.github.com/users/mbleigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbleigh/subscriptions","organizations_url":"https://api.github.com/users/mbleigh/orgs","repos_url":"https://api.github.com/users/mbleigh/repos","events_url":"https://api.github.com/users/mbleigh/events{/privacy}","received_events_url":"https://api.github.com/users/mbleigh/received_events","type":"User","site_admin":false},"repo":{"id":4828,"name":"acts-as-taggable-on","full_name":"mbleigh/acts-as-taggable-on","owner":{"login":"mbleigh","id":1022,"avatar_url":"https://avatars.githubusercontent.com/u/1022?v=3","gravatar_id":"","url":"https://api.github.com/users/mbleigh","html_url":"https://github.com/mbleigh","followers_url":"https://api.github.com/users/mbleigh/followers","following_url":"https://api.github.com/users/mbleigh/following{/other_user}","gists_url":"https://api.github.com/users/mbleigh/gists{/gist_id}","starred_url":"https://api.github.com/users/mbleigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbleigh/subscriptions","organizations_url":"https://api.github.com/users/mbleigh/orgs","repos_url":"https://api.github.com/users/mbleigh/repos","events_url":"https://api.github.com/users/mbleigh/events{/privacy}","received_events_url":"https://api.github.com/users/mbleigh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbleigh/acts-as-taggable-on","description":"A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.","fork":false,"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on","forks_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/forks","keys_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/teams","hooks_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/hooks","issue_events_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/events{/number}","events_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/events","assignees_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/assignees{/user}","branches_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/branches{/branch}","tags_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/tags","blobs_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/statuses/{sha}","languages_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/languages","stargazers_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/stargazers","contributors_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/contributors","subscribers_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/subscribers","subscription_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/subscription","commits_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/contents/{+path}","compare_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/merges","archive_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/downloads","issues_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues{/number}","pulls_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls{/number}","milestones_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/milestones{/number}","notifications_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/labels{/name}","releases_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/releases{/id}","deployments_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/deployments","created_at":"2008-03-21T19:07:26Z","updated_at":"2016-02-28T23:57:02Z","pushed_at":"2016-02-24T12:43:09Z","git_url":"git://github.com/mbleigh/acts-as-taggable-on.git","ssh_url":"git@github.com:mbleigh/acts-as-taggable-on.git","clone_url":"https://github.com/mbleigh/acts-as-taggable-on.git","svn_url":"https://github.com/mbleigh/acts-as-taggable-on","homepage":"http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on","size":1950,"stargazers_count":3583,"watchers_count":3583,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":785,"mirror_url":null,"open_issues_count":154,"forks":785,"open_issues":154,"watchers":3583,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734"},"html":{"href":"https://github.com/mbleigh/acts-as-taggable-on/pull/734"},"issue":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/734"},"comments":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/734/comments"},"review_comments":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734/comments"},"review_comment":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/pulls/734/commits"},"statuses":{"href":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/statuses/f8d0982b98af2bf6c385a1aa2e441b685940d355"}}}}