Sha256: d7528a07d2c9979a8a485b4887ac5eba056a1d3a9ab84e52a524d143ffeb73d6

Contents?: true

Size: 801 Bytes

Versions: 2

Compression:

Stored size: 801 Bytes

Contents

require 'assert'
require 'sanford/runner'

require 'test/support/service_handlers'

module Sanford::Runner

  class UnitTests < Assert::Context
    desc "Sanford::Runner"
    setup do
      request = Sanford::Protocol::Request.new('test', {})
      @runner_class = Class.new do
        include Sanford::Runner
      end
      @runner = @runner_class.new(BasicServiceHandler, request)
    end
    subject{ @runner }

    should have_cmeths :run
    should have_readers :handler_class, :request, :logger, :handler
    should have_imeths :init, :init!, :run, :run!
    should have_imeths :halt, :catch_halt

    should "not implement the run behavior" do
      assert_raises NotImplementedError do
        subject.run
      end
    end

  end

  # runner behavior tests are handled via system tests

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sanford-0.10.1 test/unit/runner_tests.rb
sanford-0.10.0 test/unit/runner_tests.rb