Skip to content

Commit

Permalink
Specs: restore coverage (#528)
Browse files Browse the repository at this point in the history
It looks like Coveralls was disabled back in c84d7b8, but it seems to
have been unrelated to the code changes. This reenables it on CI, and
uses just `SimpleCov` in local development.
  • Loading branch information
mockdeep committed Feb 20, 2021
1 parent 246f228 commit 59df9d4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -21,6 +21,7 @@ group :development, :test do
gem "rspec", "~> 3.4"
gem "rspec-html-matchers", "~> 0.7"
gem "shotgun", "~> 0.9"
gem "simplecov"
gem "timecop", "~> 0.8"
end

Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Expand Up @@ -209,6 +209,7 @@ DEPENDENCIES
rubocop (>= 0.61.1)
sass
shotgun (~> 0.9)
simplecov
sinatra (~> 1.4.8, >= 1.4.8)
sinatra-activerecord (~> 1.2, >= 1.2.3)
sinatra-contrib (~> 1.4.7)
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Expand Up @@ -8,6 +8,7 @@
require "ostruct"
require "date"

require_relative "support/coverage"
require "factories/feed_factory"
require "factories/story_factory"
require "factories/user_factory"
Expand Down
17 changes: 17 additions & 0 deletions spec/support/coverage.rb
@@ -0,0 +1,17 @@
require "simplecov"

if ENV["CI"]
require "coveralls"
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
end

SimpleCov.start("test_frameworks") do
add_group("Commands", "app/commands")
add_group("Controllers", "app/controllers")
add_group("Fever API", "app/fever_api")
add_group("Helpers", "app/helpers")
add_group("Models", "app/models")
add_group("Repositories", "app/repositories")
add_group("Tasks", "app/tasks")
add_group("Utils", "app/utils")
end

0 comments on commit 59df9d4

Please sign in to comment.