Sha256: 51b25b64c22b6443431166814ebaf06a5dc902af960e1f3c7b92c0ee888bd99b
Contents?: true
Size: 878 Bytes
Versions: 4
Compression:
Stored size: 878 Bytes
Contents
require 'rspec' RSpec.shared_examples_for 'success scenario' do it 'has successful status code' do expect(described_class.successful_status_code?).to be true end context 'has expected mandatory elements' do described_class.exchange_handler.expected_mandatory_elements.each do |mandatory_element| it mandatory_element do expect(described_class).to contain_key mandatory_element end end end described_class.exchange_handler.expected_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 described_class.exchange_handler.expected_mandatory_json_values.each do |xpath, value| it "has json '#{xpath}' equal to '#{value}'" do expect(described_class).to have_xpath_value(xpath => value) end end end
Version data entries
4 entries across 4 versions & 1 rubygems