Sha256: 64cfb31e3a0cd3656723fb90d3344299bce4ad4a75aeb85943c6168c72ecbbef
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true # "Vertaling" in het Nederlands van macrostappen van Macros4Cuke # Dit zijn stappen definities dat rechstreeks het API van Macros4Cuke gebruiken Gegeven(/^dat ik de stap "(?:Gegeven dat|Als|Dan) ik \[((?:[^\\\]]|\\.)+)\](:?)" definieƫr als:$/) do |macro_phrase, colon_capture, template| use_table = (colon_capture == ':') add_macro(macro_phrase, template, use_table) end Als(/^ik \[((?:[^\\\]]|\\.)+)\]$/) do |macro_phrase| # This will call the macro with the given phrase invoke_macro(macro_phrase) end Als(/^ik \[([^\]]+)\]:$/) do |macro_phrase, table_argument| # Ensure that the second argument is of the correct type unless table_argument.kind_of?(Cucumber::Ast::Table) error_message = 'Deze stap vereist een tabel als parameter.' raise(Macros4Cuke::DataTableNotFound, error_message) end # This will call the macro with the given phrase. # The second argument consists of an array with couples # of the kind: [argument name, actual value] invoke_macro(macro_phrase, table_argument.raw) end # End of file
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
macros4cuke-0.5.17 | examples/i18n/nl/features/step_definitions/macro_steps_nl.rb |