diff options
author | Dan Knox <dknox@threedotloft.com> | 2013-03-11 01:37:26 +0400 |
---|---|---|
committer | Dan Knox <dknox@threedotloft.com> | 2013-03-11 01:59:20 +0400 |
commit | 1479f1722702c955ed3ee9456107c6a1a7277c7b (patch) | |
tree | 9b5bbd1ac43a287f525b4a31e726990f53f59703 /features/support/env.rb | |
parent | ea9b3687db46bf876a6f966e61bfddc1e6d25ef3 (diff) |
Add Spinach coverage for Gollum Wiki system and correct the Delete link.
The previously failing Spinach steps have been fixed with this commit.
I have also added new steps that cover the entire usage of the Wiki
system.
The new Spinach steps revealed a minor bug in the Delete page process.
The path for the "Delete this page" button was previously set to
`project_wikis_page(@project, @wiki)` when it should have been
using the singular `project_wiki_page(@project, @wiki)` path helper.
The link has been corrected and all steps are now passing.
Diffstat (limited to 'features/support/env.rb')
-rw-r--r-- | features/support/env.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index 2fd7ffdb813..b83f0d12357 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -32,6 +32,9 @@ DatabaseCleaner.strategy = :truncation Spinach.hooks.before_scenario do # Use tmp dir for FS manipulations Gitlab.config.gitlab_shell.stub(repos_path: Rails.root.join('tmp', 'test-git-base-path')) + Gitlab::Shell.any_instance.stub(:add_repository) do |path| + create_temp_repo("#{Rails.root}/tmp/test-git-base-path/#{path}.git") + end FileUtils.rm_rf Gitlab.config.gitlab_shell.repos_path FileUtils.mkdir_p Gitlab.config.gitlab_shell.repos_path DatabaseCleaner.start @@ -46,3 +49,9 @@ Spinach.hooks.before_run do include FactoryGirl::Syntax::Methods end + +def create_temp_repo(path) + FileUtils.mkdir_p path + command = "git init --quiet --bare #{path};" + system(command) +end |