Skip to content

Commit a14e7f0

Browse files
authored
Merge pull request #7 from saveriomiroddi/coveralls_integration_fixes
Coveralls integration fixes
2 parents 4de3d6b + 32a3961 commit a14e7f0

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ source "https://rubygems.org"
44

55
gemspec
66

7+
group :test do
8+
gem "coveralls", "~> 0.8.21", require: false
9+
end
10+
711
group :tools do
812
gem "byebug"
913
gem "rubocop", "~> 0.52"

json_on_rails.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
2727
s.add_runtime_dependency "activerecord", "~> 4.0"
2828
s.add_runtime_dependency "mysql2", "~> 0.3"
2929

30-
s.add_development_dependency "coveralls", "~> 0.8.21"
3130
s.add_development_dependency "rake", "~> 12.3"
3231
s.add_development_dependency "rspec", "~> 3.7"
3332
s.add_development_dependency "rspec-rails", "~> 3.7"

spec/setup/spec_environment_helper.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,22 @@ class SpecEnvironmentHelper
66
TEST_MODELS_PATH = File.expand_path("models", __dir__)
77

88
def setup_spec_environment
9+
setup_coverage_tool
910
boot_mini_app
1011
require_components
1112
connection_configuration = load_connection_configuration
1213
prepare_database(connection_configuration)
1314
autoload_models
14-
setup_coverage_tool
1515
end
1616

1717
private
1818

19+
def setup_coverage_tool
20+
require "coveralls"
21+
22+
Coveralls.wear!
23+
end
24+
1925
def boot_mini_app
2026
# Requiring rails (/all) is the minimum for using rspec-rails, which gives transactional UTs.
2127
require "rails/all"
@@ -58,10 +64,4 @@ def autoload_models
5864
# paths directly. See http://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoload-paths
5965
ActiveSupport::Dependencies.autoload_paths << TEST_MODELS_PATH
6066
end
61-
62-
def setup_coverage_tool
63-
require "coveralls"
64-
65-
Coveralls.wear!
66-
end
6767
end

0 commit comments

Comments
 (0)