Sha256: 538bd222aebf64fefaee37ed0dcef1a396ae08fbb25047d42742eaab27f2149f

Contents?: true

Size: 1.04 KB

Versions: 11

Compression:

Stored size: 1.04 KB

Contents

# encoding: utf-8
# "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.'
    fail(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

11 entries across 11 versions & 1 rubygems

Version Path
macros4cuke-0.5.15 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.14 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.13 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.12 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.11 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.10 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.09 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.08 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.07 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.06 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb
macros4cuke-0.5.03 examples/i18n/nl/features/step_definitions/macro_steps_nl.rb