Class: RSGem::Tasks::SimpleCovPostInstall

Inherits:
Base
  • Object
show all
Defined in:
lib/rsgem/tasks/simple_cov_post_install.rb

Constant Summary collapse

OUTPUT =
OutputStruct.new

Instance Attribute Summary

Attributes inherited from Base

#args, #context

Instance Method Summary collapse

Methods inherited from Base

#call, #initialize

Methods included from Output

#with_output

Constructor Details

This class inherits a constructor from RSGem::Tasks::Base

Instance Method Details

#performObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rsgem/tasks/simple_cov_post_install.rb', line 7

def perform
  spec_helper.sub!("require \"#{gem_name}\"", <<~RUBY)
    require 'simplecov'

    SimpleCov.start do
      add_filter '/spec/'
    end

    require '#{gem_name}'
  RUBY

  write
end