Sha256: b685b41d5170d9d39833f3f6485ca2b18f79da4aa23e74242d8ded690b165041

Contents?: true

Size: 536 Bytes

Versions: 3

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'

describe GrapeApiary::Resource do
  include_context 'configuration'

  subject { GrapeApiary::Resource.new('foo', []) }

  context 'sample' do
    it 'request generation is delegated to a generator' do
      expect(subject.sample_generator).to receive(:request)

      subject.sample_request
    end

    it 'response generation is delegated to a generator' do
      expect(subject.sample_generator).to receive(:response)

      subject.sample_response(GrapeApiary::Route.new(Grape::Route.new))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
grape-apiary-0.1.2 spec/grape-apiary/resource_spec.rb
grape-apiary-0.1.1 spec/grape-apiary/resource_spec.rb
grape-apiary-0.1.0 spec/grape-apiary/resource_spec.rb