Sha256: bfdc6170bb299bd0a6196535becdd39e0fbcc3cffe7fe81259b6fcba7215ff61

Contents?: true

Size: 1.64 KB

Versions: 6

Compression:

Stored size: 1.64 KB

Contents

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'fuelsdk'

RSpec.configure do |config|
  config.mock_with :rspec

  # Use color in STDOUT
  config.color_enabled = true

  # Use the specified formatter
  config.formatter = :documentation
end

shared_examples_for 'Response Object' do
  it { should respond_to(:code) }
  it { should respond_to(:message) }
  it { should respond_to(:results) }
  it { should respond_to(:request_id) }
  it { should respond_to(:body) }
  it { should respond_to(:raw) }
  it { should respond_to(:more) }
  it { should respond_to(:more?) }
  it { should respond_to(:success) }
  it { should respond_to(:success?) }
  it { should respond_to(:status) }
  it { should respond_to(:continue) }
end

# Everything will be readable so test for shared from Read behavior
shared_examples_for 'Soap Read Object' do
  # begin backwards compat
  it { should respond_to :props= }
  it { should respond_to :authStub= }
  # end
  it { should respond_to :id }
  it { should respond_to :properties }
  it { should respond_to :client }
  it { should respond_to :filter }
  it { should respond_to :info }
  it { should respond_to :get }
end

shared_examples_for 'Soap CUD Object' do
  it { should respond_to :post }
  it { should respond_to :patch }
  it { should respond_to :delete }
end

shared_examples_for 'Soap Object' do
  it_behaves_like 'Soap Read Object'
  it_behaves_like 'Soap CUD Object'
end

shared_examples_for 'Soap Read Only Object' do
  it_behaves_like 'Soap Read Object'
  it { should_not respond_to :post }
  it { should_not respond_to :patch }
  it { should_not respond_to :delete }
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fuelsdk-0.1.6 spec/spec_helper.rb
fuelsdk-0.1.5 spec/spec_helper.rb
fuelsdk-0.1.4 spec/spec_helper.rb
fuelsdk-0.1.3 spec/spec_helper.rb
fuelsdk-0.1.2 spec/spec_helper.rb
fuelsdk-0.1.1 spec/spec_helper.rb