Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-07-18 16:06:53 +0300
committerRémy Coutable <remy@rymai.me>2018-07-18 16:06:53 +0300
commitd2db7d40dd85aa8e80b6429d7fd6b8df23ecac2a (patch)
tree332768b9f1edd68c42f08ec2fe31a31e22cf8920 /qa/spec
parentd81189029d072b41434992efb991152842639009 (diff)
Disambiguate 'File' under qa/ since we have a QA::Factory::Resource::File class as well
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/git/repository_spec.rb2
-rw-r--r--qa/spec/page/view_spec.rb4
-rw-r--r--qa/spec/scenario/test/instance_spec.rb2
-rw-r--r--qa/spec/spec_helper.rb2
4 files changed, 5 insertions, 5 deletions
diff --git a/qa/spec/git/repository_spec.rb b/qa/spec/git/repository_spec.rb
index ee1f08da238..5c65128d10c 100644
--- a/qa/spec/git/repository_spec.rb
+++ b/qa/spec/git/repository_spec.rb
@@ -29,7 +29,7 @@ describe QA::Git::Repository do
def cd_empty_temp_directory
tmp_dir = 'tmp/git-repository-spec/'
- FileUtils.rm_r(tmp_dir) if File.exist?(tmp_dir)
+ FileUtils.rm_r(tmp_dir) if ::File.exist?(tmp_dir)
FileUtils.mkdir_p tmp_dir
FileUtils.cd tmp_dir
end
diff --git a/qa/spec/page/view_spec.rb b/qa/spec/page/view_spec.rb
index aedbc3863a7..34d2ff11447 100644
--- a/qa/spec/page/view_spec.rb
+++ b/qa/spec/page/view_spec.rb
@@ -32,7 +32,7 @@ describe QA::Page::View do
context 'when pattern is found' do
before do
- allow(File).to receive(:foreach)
+ allow(::File).to receive(:foreach)
.and_yield('some element').once
allow(element).to receive(:matches?)
.with('some element').and_return(true)
@@ -45,7 +45,7 @@ describe QA::Page::View do
context 'when pattern has not been found' do
before do
- allow(File).to receive(:foreach)
+ allow(::File).to receive(:foreach)
.and_yield('some element').once
allow(element).to receive(:matches?)
.with('some element').and_return(false)
diff --git a/qa/spec/scenario/test/instance_spec.rb b/qa/spec/scenario/test/instance_spec.rb
index a74a9538be8..0d0b534911f 100644
--- a/qa/spec/scenario/test/instance_spec.rb
+++ b/qa/spec/scenario/test/instance_spec.rb
@@ -30,7 +30,7 @@ describe QA::Scenario::Test::Instance do
subject.perform("test")
expect(runner).to have_received(:options=)
- .with(File.expand_path('../../../qa/specs/features', __dir__))
+ .with(::File.expand_path('../../../qa/specs/features', __dir__))
end
end
diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb
index c2c6cf95406..8e6613cd688 100644
--- a/qa/spec/spec_helper.rb
+++ b/qa/spec/spec_helper.rb
@@ -1,6 +1,6 @@
require_relative '../qa'
-Dir[File.join(__dir__, 'support', '**', '*.rb')].each { |f| require f }
+Dir[::File.join(__dir__, 'support', '**', '*.rb')].each { |f| require f }
RSpec.configure do |config|
config.expect_with :rspec do |expectations|