Sha256: 015e4d15c2afd2f5ce9e61182289300583aafc2f4bb1b0e2715d7c8c77fcaf7c

Contents?: true

Size: 698 Bytes

Versions: 12

Compression:

Stored size: 698 Bytes

Contents

# -*- coding: utf-8 -*-

require 'spec_helper'
require 'turnip_formatter/step_template/exception'

module TurnipFormatter
  module StepTemplate
    describe Exception do
      let(:template) { ::TurnipFormatter::StepTemplate::Exception }
      let(:exception) do
        StandardError.new('StepExceptionError').tap do |e|
          e.set_backtrace('/path/to/error.rb: 10')
        end
      end

      describe '.build' do
        subject { template.build(exception) }
        it do
          should match %r{div class="step_exception"}
          should match %r{<pre>.*#{exception.message}.*</pre>}
          should match %r{<li>/path/to/error.rb: 10</li>}
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
turnip_formatter-0.2.11 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.10 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.9 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.8 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.7 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.6 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.5 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.4 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.3 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.2 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.1 spec/turnip_formatter/step_template/exception_spec.rb
turnip_formatter-0.2.0 spec/turnip_formatter/step_template/exception_spec.rb