Sha256: ed9acf754a25762852bf9656bae74b180b208b3f732fa3118e72788c5c2b74dc
Contents?: true
Size: 847 Bytes
Versions: 26
Compression:
Stored size: 847 Bytes
Contents
require 'rspec' shared_examples_for 'success scenario' do it 'has successful status code' do expect(200..299).to cover described_class.status_code end context 'has expected mandatory elements' do described_class.api_class.expected_mandatory_elements.each do |mandatory_element| it mandatory_element do expect(described_class).to contain_key mandatory_element end end end described_class.api_class.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.api_class.expected_mandatory_json_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
26 entries across 26 versions & 1 rubygems