summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/project_wiki_spec.rb (renamed from spec/models/gollum_wiki_spec.rb)10
-rw-r--r--spec/models/wiki_page_spec.rb2
-rw-r--r--spec/services/projects/create_service_spec.rb4
-rw-r--r--spec/support/test_env.rb2
4 files changed, 9 insertions, 9 deletions
diff --git a/spec/models/gollum_wiki_spec.rb b/spec/models/project_wiki_spec.rb
index 9b9d15b4ff4..32a82470e4f 100644
--- a/spec/models/gollum_wiki_spec.rb
+++ b/spec/models/project_wiki_spec.rb
@@ -1,6 +1,6 @@
require "spec_helper"
-describe GollumWiki do
+describe ProjectWiki do
def remove_temp_repo(path)
FileUtils.rm_rf path
@@ -23,7 +23,7 @@ describe GollumWiki do
let(:user) { project.owner }
let(:gitlab_shell) { Gitlab::Shell.new }
- subject { GollumWiki.new(project, user) }
+ subject { ProjectWiki.new(project, user) }
before do
create_temp_repo(subject.send(:path_to_repo))
@@ -68,15 +68,15 @@ describe GollumWiki do
end
it "creates a new wiki repo if one does not yet exist" do
- wiki = GollumWiki.new(project, user)
+ wiki = ProjectWiki.new(project, user)
wiki.create_page("index", "test content").should_not == false
FileUtils.rm_rf wiki.send(:path_to_repo)
end
it "raises CouldNotCreateWikiError if it can't create the wiki repository" do
- GollumWiki.any_instance.stub(:init_repo).and_return(false)
- expect { GollumWiki.new(project, user).wiki }.to raise_exception(GollumWiki::CouldNotCreateWikiError)
+ ProjectWiki.any_instance.stub(:init_repo).and_return(false)
+ expect { ProjectWiki.new(project, user).wiki }.to raise_exception(ProjectWiki::CouldNotCreateWikiError)
end
end
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb
index 1c70edf0d4d..2af164bd99b 100644
--- a/spec/models/wiki_page_spec.rb
+++ b/spec/models/wiki_page_spec.rb
@@ -22,7 +22,7 @@ describe WikiPage do
let(:project) { create(:project) }
let(:repository) { project.repository }
let(:user) { project.owner }
- let(:wiki) { GollumWiki.new(project, user) }
+ let(:wiki) { ProjectWiki.new(project, user) }
subject { WikiPage.new(wiki) }
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index f2a784df103..38aae452c3c 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -42,7 +42,7 @@ describe Projects::CreateService do
context 'wiki_enabled true creates wiki repository directory' do
before do
@project = create_project(@user, @opts)
- @path = GollumWiki.new(@project, @user).send(:path_to_repo)
+ @path = ProjectWiki.new(@project, @user).send(:path_to_repo)
end
it { File.exists?(@path).should be_true }
@@ -52,7 +52,7 @@ describe Projects::CreateService do
before do
@opts.merge!(wiki_enabled: false)
@project = create_project(@user, @opts)
- @path = GollumWiki.new(@project, @user).send(:path_to_repo)
+ @path = ProjectWiki.new(@project, @user).send(:path_to_repo)
end
it { File.exists?(@path).should be_false }
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index d237f7ad094..b1bb65a836e 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -52,7 +52,7 @@ module TestEnv
def setup_stubs()
# Use tmp dir for FS manipulations
repos_path = testing_path()
- GollumWiki.any_instance.stub(:init_repo) do |path|
+ ProjectWiki.any_instance.stub(:init_repo) do |path|
create_temp_repo(File.join(repos_path, "#{path}.git"))
end