Sha256: ff4ebf4098071b84057ad1444daba877c7b94501efbb39af1e1d4f82ccc5114f

Contents?: true

Size: 944 Bytes

Versions: 11

Compression:

Stored size: 944 Bytes

Contents

require 'helper'
require 'turnip_formatter/renderer/html/runtime_error'
require 'turnip_formatter/resource/scenario/pass'

module TurnipFormatter::Renderer::Html
  class TestRuntimeError < Test::Unit::TestCase
    include TurnipFormatter::TestHelper

    def setup
      @renderer = RuntimeError.new([exception, scenario])
    end

    def test_runtime_exception
      assert_equal(exception, @renderer.runtime_exception)
    end

    def test_scenario
      assert_equal(scenario, @renderer.scenario)
    end

    private

    def exception
      @@exception ||= Exception.new('TFERROR')
    end

    def scenario
      @@scenario ||= (
        feature = feature_build(<<-EOS)
          Feature: F
            Scenario: S
              When I attack it
        EOS

        scenario_example = run_feature(feature, '/path/to/test.feature').first
        TurnipFormatter::Resource::Scenario::Pass.new(scenario_example)
      )
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
turnip_formatter-0.8.0 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.7.2 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.7.1 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.7.0 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.6.1 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.6.0 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.6.0.pre.beta.7 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.6.0.pre.beta.6 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.6.0.pre.beta.5 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.6.0.pre.beta.4 test/turnip_formatter/renderer/html/test_runtime_error.rb
turnip_formatter-0.6.0.pre.beta.3 test/turnip_formatter/renderer/html/test_runtime_error.rb