module Soaspec # Describes methods test handlers use to easily set attributes # Some are included in 'success scenarios' and to configure the request sent module Accessors # Defines expected_mandatory_elements method used in 'success_scenarios' shared examples # to indicate certain elements must be present # @param [Array] elements Array of symbols specifying expected element names for 'success_scearios' in snakecase def mandatory_elements(elements) define_method('expected_mandatory_elements') do elements end end def mandatory_xpath_values(xpath_value_pairs) raise ArgumentError('Hash of {xpath => expected values} expected ') unless xpath_value_pairs.is_a? Hash define_method('expected_mandatory_xpath_values') do xpath_value_pairs end end end end