diff --git a/.gitignore b/.gitignore index 288e369e8c272fbf38da89a1eea86c07da2eef9b..2d1063449ada9835ce3c47895ed4cd96605d24a1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ bundle .bundle vendor /tmp +coverage diff --git a/Gemfile b/Gemfile index c6da111ccadb6d2a4575af435242808e6c809e32..5487076341c4dbed50d71aa4e43311533061efdc 100644 --- a/Gemfile +++ b/Gemfile @@ -10,4 +10,5 @@ gem "ruby-cute", :require => "cute" gem "peach" gem "restfully" gem "rspec" -gem "webmock" \ No newline at end of file +gem "webmock" +gem "simplecov" diff --git a/Gemfile.lock b/Gemfile.lock index f821a002ad9b052c9aafa3628f058c6adf12a359..b92256af24d4479ab80058e61b7b0c74d065172f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,6 +10,7 @@ GEM diff-lcs (1.3) diffy (3.3.0) dns-zone (0.3.1) + docile (1.3.2) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) faraday (0.15.4) @@ -93,6 +94,11 @@ GEM net-ssh-multi (>= 1.2) rest-client (>= 1.6) safe_yaml (1.0.5) + simplecov (0.17.1) + docile (~> 1.1) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.2) unf (0.1.4) unf_ext unf_ext (0.0.7.6) @@ -115,4 +121,5 @@ DEPENDENCIES restfully rspec ruby-cute + simplecov webmock diff --git a/tests/oar_properties_spec.rb b/tests/oar_properties_spec.rb index ad1bffd53171d14b92763adc9803574558dd26c5..0039cb79a1f4c3bcdcb9fd888630c174fb94b6b8 100644 --- a/tests/oar_properties_spec.rb +++ b/tests/oar_properties_spec.rb @@ -1,3 +1,5 @@ +$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) +require 'spec_helper' require 'rspec' require 'webmock/rspec' diff --git a/tests/spec_helper.rb b/tests/spec_helper.rb new file mode 100644 index 0000000000000000000000000000000000000000..f0876afe7625af89fe0aaa188257361cffe41eb8 --- /dev/null +++ b/tests/spec_helper.rb @@ -0,0 +1,9 @@ +require 'simplecov' + +SimpleCov.start do + add_filter '/tests/' + add_filter '/bundle/' +end +# This outputs the report to your public folder +# You will want to add this to .gitignore +SimpleCov.coverage_dir 'coverage'