Skip to content

Coveralls integration fixes #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ source "https://rubygems.org"

gemspec

group :test do
gem "coveralls", "~> 0.8.21", require: false
end

group :tools do
gem "byebug"
gem "rubocop", "~> 0.52"
Expand Down
1 change: 0 additions & 1 deletion json_on_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Gem::Specification.new do |s|
s.add_runtime_dependency "activerecord", "~> 4.0"
s.add_runtime_dependency "mysql2", "~> 0.3"

s.add_development_dependency "coveralls", "~> 0.8.21"
s.add_development_dependency "rake", "~> 12.3"
s.add_development_dependency "rspec", "~> 3.7"
s.add_development_dependency "rspec-rails", "~> 3.7"
Expand Down
14 changes: 7 additions & 7 deletions spec/setup/spec_environment_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@ class SpecEnvironmentHelper
TEST_MODELS_PATH = File.expand_path("models", __dir__)

def setup_spec_environment
setup_coverage_tool
boot_mini_app
require_components
connection_configuration = load_connection_configuration
prepare_database(connection_configuration)
autoload_models
setup_coverage_tool
end

private

def setup_coverage_tool
require "coveralls"

Coveralls.wear!
end

def boot_mini_app
# Requiring rails (/all) is the minimum for using rspec-rails, which gives transactional UTs.
require "rails/all"
Expand Down Expand Up @@ -58,10 +64,4 @@ def autoload_models
# paths directly. See http://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoload-paths
ActiveSupport::Dependencies.autoload_paths << TEST_MODELS_PATH
end

def setup_coverage_tool
require "coveralls"

Coveralls.wear!
end
end