Sha256: 110eba62b87d4c8b069762b6d3c3399143ee44461039a838b7c2f9bdf351ebe2
Contents?: true
Size: 1.01 KB
Versions: 5
Compression:
Stored size: 1.01 KB
Contents
require_relative '../../../test_helper' module Troo module API describe Responder do let(:described_class) { Responder } let(:parameters) { { code: code } } subject { described_class.build(parameters) } context 'when the status code is 200' do let(:code) { '200' } it { subject.must_be_instance_of(Troo::API::Response) } end context 'when the status code is any other value' do let(:code) { '410' } it { subject.must_be_instance_of(Troo::API::ErrorResponse) } end end describe Response do let(:described_class) { Response } let(:parameters) { {} } subject { described_class.new(parameters) } it { subject.must_be_instance_of(Troo::API::Response) } end describe ErrorResponse do let(:described_class) { ErrorResponse } let(:parameters) { {} } subject { described_class.new(parameters) } it { subject.must_be_instance_of(Troo::API::ErrorResponse) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems