Sha256: 80c248c29b3da487e91c3a3ad1c39c9df22a6deb488d8b90b089d8fac76ffbe3
Contents?: true
Size: 747 Bytes
Versions: 3
Compression:
Stored size: 747 Bytes
Contents
require 'assert' class Sanford::Runner class BaseTest < Assert::Context desc "Sanford::Runner" setup do request = Sanford::Protocol::Request.new('v1', 'test', {}) @runner = Sanford::Runner.new(BasicServiceHandler, request) end subject{ @runner } should have_instance_methods :handler_class, :request, :logger, :run should "run the handler and return the response it generates when `run` is called" do response = subject.run assert_instance_of Sanford::Protocol::Response, response assert_equal 200, response.code assert_equal 'Joe Test', response.data['name'] assert_equal 'joe.test@example.com', response.data['email'] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sanford-0.4.0 | test/unit/runner_test.rb |
sanford-0.3.0 | test/unit/runner_test.rb |
sanford-0.2.0 | test/unit/runner_test.rb |