diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-09-26 14:52:01 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-09-26 16:32:26 -0400 |
commit | afc4a75499b6678a643e6b62f703f8e7e1eb0f0a (patch) | |
tree | 19855be537491fb2e1f79907e034f8f199915f46 /spec | |
parent | 82c3f6260366147803d5f63d575231f77c7e73ce (diff) | |
download | gitlab-ce-afc4a75499b6678a643e6b62f703f8e7e1eb0f0a.tar.gz |
Use Rails.root.join where appropriate
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/project_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/stubbed_repository.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index c313b58ecd6..bb975a93dfd 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -125,7 +125,7 @@ describe Project do it "should return path to repo" do project = Project.new(path: "somewhere") - project.path_to_repo.should == File.join(Rails.root, "tmp", "repositories", "somewhere") + project.path_to_repo.should == Rails.root.join("tmp", "repositories", "somewhere") end it "returns the full web URL for this repo" do diff --git a/spec/support/stubbed_repository.rb b/spec/support/stubbed_repository.rb index 90491e430b4..5bf3ea46099 100644 --- a/spec/support/stubbed_repository.rb +++ b/spec/support/stubbed_repository.rb @@ -5,11 +5,11 @@ module StubbedRepository if new_record? || path == 'newproject' # There are a couple Project specs and features that expect the Project's # path to be in the returned path, so let's patronize them. - File.join(Rails.root, 'tmp', 'repositories', path) + Rails.root.join('tmp', 'repositories', path) else # For everything else, just give it the path to one of our real seeded # repos. - File.join(Rails.root, 'tmp', 'repositories', 'gitlabhq') + Rails.root.join('tmp', 'repositories', 'gitlabhq') end end |