Skip to content

Commit

Permalink
improve coverage config
Browse files Browse the repository at this point in the history
  • Loading branch information
codez committed Apr 17, 2018
1 parent ba4c071 commit 7a07fd0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 0 additions & 4 deletions app/services/audio_processor/ffmpeg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ def audio_format
AudioFormat.new(codec, bitrate || 1, channels)
end

def file_extension
::File.extname(audio.path)[1..-1]
end

private

def audio
Expand Down
20 changes: 16 additions & 4 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
require 'simplecov'
SimpleCov.start 'rails' do
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
])
SimpleCov.start do
coverage_dir 'test/coverage'

add_filter '/test/'
add_filter '/config/'
add_filter '/lib/'

add_group 'Controllers', 'app/controllers'
add_group 'Models', 'app/models'
add_group 'Services', 'app/services'
add_group 'Serializers', 'app/serializers'
end
require 'coveralls'
Coveralls.wear!

ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
Expand Down Expand Up @@ -49,7 +61,7 @@ def logout
def set_auth_token(token)
request.env['HTTP_AUTHORIZATION'] = encode_token(token)
end

end

class ActionDispatch::IntegrationTest < ActiveSupport::TestCase
Expand Down

0 comments on commit 7a07fd0

Please sign in to comment.