diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 19:17:35 +0100 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 19:17:35 +0100 |
commit | 0c4a70a306b871899bf87ce4673918abfee4d95f (patch) | |
tree | c7a702fb511209ffe0eceba245d1ffea71dce1aa /spec/finders/snippets_finder_spec.rb | |
parent | de1c450abd6b367390a1295cac402344f500d41d (diff) | |
download | gitlab-ce-0c4a70a306b871899bf87ce4673918abfee4d95f.tar.gz |
Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'spec/finders/snippets_finder_spec.rb')
-rw-r--r-- | spec/finders/snippets_finder_spec.rb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/spec/finders/snippets_finder_spec.rb b/spec/finders/snippets_finder_spec.rb index c645cbc964c..1b4ffc2d717 100644 --- a/spec/finders/snippets_finder_spec.rb +++ b/spec/finders/snippets_finder_spec.rb @@ -18,14 +18,14 @@ describe SnippetsFinder do it "returns all private and internal snippets" do snippets = SnippetsFinder.new.execute(user, filter: :all) - snippets.should include(@snippet2, @snippet3) - snippets.should_not include(@snippet1) + expect(snippets).to include(@snippet2, @snippet3) + expect(snippets).not_to include(@snippet1) end it "returns all public snippets" do snippets = SnippetsFinder.new.execute(nil, filter: :all) - snippets.should include(@snippet3) - snippets.should_not include(@snippet1, @snippet2) + expect(snippets).to include(@snippet3) + expect(snippets).not_to include(@snippet1, @snippet2) end end @@ -38,37 +38,37 @@ describe SnippetsFinder do it "returns all public and internal snippets" do snippets = SnippetsFinder.new.execute(user1, filter: :by_user, user: user) - snippets.should include(@snippet2, @snippet3) - snippets.should_not include(@snippet1) + expect(snippets).to include(@snippet2, @snippet3) + expect(snippets).not_to include(@snippet1) end it "returns internal snippets" do snippets = SnippetsFinder.new.execute(user, filter: :by_user, user: user, scope: "are_internal") - snippets.should include(@snippet2) - snippets.should_not include(@snippet1, @snippet3) + expect(snippets).to include(@snippet2) + expect(snippets).not_to include(@snippet1, @snippet3) end it "returns private snippets" do snippets = SnippetsFinder.new.execute(user, filter: :by_user, user: user, scope: "are_private") - snippets.should include(@snippet1) - snippets.should_not include(@snippet2, @snippet3) + expect(snippets).to include(@snippet1) + expect(snippets).not_to include(@snippet2, @snippet3) end it "returns public snippets" do snippets = SnippetsFinder.new.execute(user, filter: :by_user, user: user, scope: "are_public") - snippets.should include(@snippet3) - snippets.should_not include(@snippet1, @snippet2) + expect(snippets).to include(@snippet3) + expect(snippets).not_to include(@snippet1, @snippet2) end it "returns all snippets" do snippets = SnippetsFinder.new.execute(user, filter: :by_user, user: user) - snippets.should include(@snippet1, @snippet2, @snippet3) + expect(snippets).to include(@snippet1, @snippet2, @snippet3) end it "returns only public snippets if unauthenticated user" do snippets = SnippetsFinder.new.execute(nil, filter: :by_user, user: user) - snippets.should include(@snippet3) - snippets.should_not include(@snippet2, @snippet1) + expect(snippets).to include(@snippet3) + expect(snippets).not_to include(@snippet2, @snippet1) end end @@ -82,20 +82,20 @@ describe SnippetsFinder do it "returns public snippets for unauthorized user" do snippets = SnippetsFinder.new.execute(nil, filter: :by_project, project: project1) - snippets.should include(@snippet3) - snippets.should_not include(@snippet1, @snippet2) + expect(snippets).to include(@snippet3) + expect(snippets).not_to include(@snippet1, @snippet2) end it "returns public and internal snippets for none project members" do snippets = SnippetsFinder.new.execute(user, filter: :by_project, project: project1) - snippets.should include(@snippet2, @snippet3) - snippets.should_not include(@snippet1) + expect(snippets).to include(@snippet2, @snippet3) + expect(snippets).not_to include(@snippet1) end it "returns all snippets for project members" do project1.team << [user, :developer] snippets = SnippetsFinder.new.execute(user, filter: :by_project, project: project1) - snippets.should include(@snippet1, @snippet2, @snippet3) + expect(snippets).to include(@snippet1, @snippet2, @snippet3) end end end |