Sha256: 652edbec6062795a7e17f75eaf339c4834b2c1eec721d77b782a79c481ece677

Contents?: true

Size: 679 Bytes

Versions: 16

Compression:

Stored size: 679 Bytes

Contents

require 'tempfile'
require_relative '../../spec_helper'
require_lib 'reek/examiner'
require_lib 'reek/report/report'

RSpec.describe Reek::Report::HTMLReport do
  let(:instance) { Reek::Report::HTMLReport.new }

  context 'with an empty source' do
    let(:examiner) { Reek::Examiner.new('') }

    before do
      instance.add_examiner examiner
    end

    it 'has the text 0 total warnings' do
      tempfile = Tempfile.new(['Reek::Report::HTMLReport.', '.html'])
      response = "HTML file saved\n"
      expect { instance.show(target_path: tempfile.path) }.
        to output(response).to_stdout
      expect(tempfile.read).to include('0 total warnings')
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
reek-3.11 spec/reek/report/html_report_spec.rb
reek-3.10.2 spec/reek/report/html_report_spec.rb
reek-3.10.1 spec/reek/report/html_report_spec.rb
reek-3.10.0 spec/reek/report/html_report_spec.rb
reek-3.9.1 spec/reek/report/html_report_spec.rb
reek-3.9.0 spec/reek/report/html_report_spec.rb
reek-3.8.3 spec/reek/report/html_report_spec.rb
reek-3.8.2 spec/reek/report/html_report_spec.rb
reek-3.8.1 spec/reek/report/html_report_spec.rb
reek-3.8.0 spec/reek/report/html_report_spec.rb
reek-3.7.1 spec/reek/report/html_report_spec.rb
reek-3.7.0 spec/reek/report/html_report_spec.rb
reek-3.6.1 spec/reek/report/html_report_spec.rb
reek-3.6.0 spec/reek/report/html_report_spec.rb
reek-3.5.0 spec/reek/report/html_report_spec.rb
reek-3.4.1 spec/reek/report/html_report_spec.rb