summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-05-21 18:24:46 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-06-10 01:31:27 -0400
commit57830201a9152b56ccf65a98275601617f44653d (patch)
treeae5698bb851d8e203acedadbdd0ebec20742807c /spec/support
parent2f3ab0ab858f3343807716d5ef033f7a90112d51 (diff)
downloadgitlab-ce-57830201a9152b56ccf65a98275601617f44653d.tar.gz
Add spec/support files for WebMock and test coverage
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/coverage.rb8
-rw-r--r--spec/support/webmock.rb4
2 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/coverage.rb b/spec/support/coverage.rb
new file mode 100644
index 00000000000..a54bf03380c
--- /dev/null
+++ b/spec/support/coverage.rb
@@ -0,0 +1,8 @@
+if ENV['SIMPLECOV']
+ require 'simplecov'
+end
+
+if ENV['COVERALLS']
+ require 'coveralls'
+ Coveralls.wear_merged!
+end
diff --git a/spec/support/webmock.rb b/spec/support/webmock.rb
new file mode 100644
index 00000000000..af2906b7568
--- /dev/null
+++ b/spec/support/webmock.rb
@@ -0,0 +1,4 @@
+require 'webmock'
+require 'webmock/rspec'
+
+WebMock.disable_net_connect!(allow_localhost: true)