Sha256: 3944ba46635d25a47d42d48a6a888f8eb0e413dff7541fcdc6346923e3381a60

Contents?: true

Size: 472 Bytes

Versions: 1

Compression:

Stored size: 472 Bytes

Contents

require 'rspec'

shared_examples_for 'success scenario' do
  it 'has status code of 200' do
    expect(described_class.status_code).to eq 200
  end
  if described_class.mandatory_elements
    context 'has expected mandatory elements' do
      described_class.mandatory_elements.each do |mandatory_element|
        it "#{mandatory_element} element" do
          expect(described_class).to contain_key mandatory_element
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
soaspec-0.0.7 lib/soaspec/shared_examples.rb