Skip to content

Commit

Permalink
simplecov update
Browse files Browse the repository at this point in the history
Change-Id: Ie61a2ec6d9f460b1cc7f448e3d658c8c552675b5
Reviewed-on: https://gerrit.instructure.com/21064
Tested-by: Jenkins <[email protected]>
Reviewed-by: Shawn Meredith <[email protected]>
Product-Review: Shawn Meredith <[email protected]>
QA-Review: Shawn Meredith <[email protected]>
  • Loading branch information
smeredith0506 committed May 31, 2013
1 parent 615cc09 commit e1cb546
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
7 changes: 0 additions & 7 deletions lib/tasks/rspec.rake
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ unless ARGV.any? { |a| a =~ /\Agems/ }
t.spec_files = ParallelExclude::AVAILABLE_FILES
end

desc "Run all specs in spec directory with SimpleCov"
Spec::Rake::SpecTask.new(:simplecov) do |t|
ENV['COVERAGE'] = 'true'
t.spec_opts = ['--options', "\"#{Rails.root}/spec/spec.opts\""]
t.spec_files = FileList['vendor/plugins/*/spec_canvas/**/*_spec.rb'].exclude('vendor/plugins/*/spec_canvas/selenium/*_spec.rb') + FileList['spec/**/*_spec.rb'].exclude('spec/selenium/**/*_spec.rb')
end

desc "Print Specdoc for all specs (excluding plugin specs)"
Spec::Rake::SpecTask.new(:doc) do |t|
t.spec_opts = ["--format", "specdoc", "--dry-run"]
Expand Down
7 changes: 5 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
#

if ENV['COVERAGE'] == "true"
require 'simplecov'
if ENV['COVERAGE'] == "1"
puts "Code Coverage enabled"
SimpleCov.start do
SimpleCov.use_merging true
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
add_filter '/spec/'
add_filter '/config/'
Expand All @@ -36,6 +37,8 @@
SimpleCov.result.format!
end
end
else
puts "Code coverage not enabled"
end

ENV["RAILS_ENV"] = 'test'
Expand Down

0 comments on commit e1cb546

Please sign in to comment.