Sha256: 68fe08aed6ebf2008d1ef62bdd0495ad25c69dbdcfb8b25bc1c479b38ab97fa3

Contents?: true

Size: 456 Bytes

Versions: 11

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_examples_for 'a cake admin method' do
  subject(:admin) { described_class.new }

  let(:request) { instance_double(SoapyCake::Request) }

  it 'runs the request' do
    expect(SoapyCake::Request).to receive(:new)
      .with(:admin, service, cake_method, cake_opts || {}).and_return(request)
    expect(admin).to receive(:run).with(request)

    admin.public_send(method, *[opts || cake_opts].compact)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
soapy_cake-2.3.1 spec/support/admin_method_example.rb
soapy_cake-2.3.0 spec/support/admin_method_example.rb
soapy_cake-2.2.7 spec/support/admin_method_example.rb
soapy_cake-2.2.6 spec/support/admin_method_example.rb
soapy_cake-2.2.5 spec/support/admin_method_example.rb
soapy_cake-2.2.4 spec/support/admin_method_example.rb
soapy_cake-2.2.3 spec/support/admin_method_example.rb
soapy_cake-2.2.1 spec/support/admin_method_example.rb
soapy_cake-2.1.6 spec/support/admin_method_example.rb
soapy_cake-2.1.5 spec/support/admin_method_example.rb
soapy_cake-2.1.4 spec/support/admin_method_example.rb