Skip to content

Commit b2d98e5

Browse files
committed
Starts measuring code coverage with coveralls
1 parent 40398fa commit b2d98e5

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Gemfile.lock
44
pkg/*
55
doc/
66
vendor/
7+
coverage/

docx.gemspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ Gem::Specification.new do |s|
1010
s.authors = ['Christopher Hunt', 'Marcus Ortiz', 'Higgins Dragon', 'Toms Mikoss', 'Sebastian Wittenkamp']
1111
s.email = ['chrahunt@gmail.com']
1212
s.homepage = 'https://github.com/chrahunt/docx'
13-
s.files = Dir["README.md", "LICENSE.md", "lib/**/*.rb"]
13+
s.files = Dir['README.md', 'LICENSE.md', 'lib/**/*.rb']
1414
s.required_ruby_version = '>= 2.4.0'
1515

1616
s.add_dependency 'nokogiri', '~> 1.10', '>= 1.10.4'
1717
s.add_dependency 'rubyzip', '~> 2.0'
1818

19-
s.add_development_dependency 'rspec', '~> 3.7'
19+
s.add_development_dependency 'coveralls', '~> 0.8'
2020
s.add_development_dependency 'rake', '~> 13.0'
21+
s.add_development_dependency 'rspec', '~> 3.7'
2122
end

spec/docx/document_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
14
require 'docx'
25
require 'tempfile'
36

spec/spec_helper.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
if ENV['COVERALLS_REPO_TOKEN']
4+
require 'coveralls'
5+
6+
Coveralls.wear!
7+
end
8+
19
# This file was generated by the `rspec --init` command. Conventionally, all
210
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
311
# Require this file using `require "spec_helper"` to ensure that it is only
@@ -8,7 +16,7 @@
816
config.treat_symbols_as_metadata_keys_with_true_values = true
917
config.run_all_when_everything_filtered = true
1018
config.filter_run :focus
11-
19+
1220
# Run specs in random order to surface order dependencies. If you find an
1321
# order dependency and want to debug it, you can fix the order by providing
1422
# the seed, which is printed after each run.

0 commit comments

Comments
 (0)