lib/soaspec/accessors.rb in soaspec-0.0.34 vs lib/soaspec/accessors.rb in soaspec-0.0.35
- old
+ new
@@ -10,9 +10,19 @@
define_method('expected_mandatory_elements') do
elements
end
end
+ # Defines mandatory xpaths value pairs to be included in 'success scenario' shared example
+ #
+ # @example Inside class
+ # mandatory_xpath_values '//xmlns:GetWeatherResult' => 'Data Not Found'
+ #
+ # In test
+ # describe Exchange(:name) do
+ # it_behaves_like 'success scenario' # Includes xpath pair validation
+ # 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
\ No newline at end of file