Sha256: f03f81ff0991aefe653b5478d6f8edce83bc05ad4deecbf589824bcc060f72eb
Contents?: true
Size: 909 Bytes
Versions: 12
Compression:
Stored size: 909 Bytes
Contents
# frozen_string_literal: true 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
12 entries across 12 versions & 1 rubygems