Sha256: cd26950aa65d33380b736991bb5a2c1c141a00e85ff8543a137491067a4b7c6b

Contents?: true

Size: 581 Bytes

Versions: 6

Compression:

Stored size: 581 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
  context 'has expected mandatory elements' do
    described_class.mandatory_elements.each do |mandatory_element|
      it mandatory_element do
        expect(described_class).to contain_key mandatory_element
      end
    end
  end
  described_class.mandatory_xpath_values.each do |xpath, value|
    it "has xpath '#{xpath}' equal to '#{value}'" do
      expect(described_class).to have_xpath_value(xpath => value)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
soaspec-0.0.25 lib/soaspec/soaspec_shared_examples.rb
soaspec-0.0.24 lib/soaspec/soaspec_shared_examples.rb
soaspec-0.0.23 lib/soaspec/soaspec_shared_examples.rb
soaspec-0.0.22 lib/soaspec/soaspec_shared_examples.rb
soaspec-0.0.21 lib/soaspec/soaspec_shared_examples.rb
soaspec-0.0.20 lib/soaspec/soaspec_shared_examples.rb