Sha256: fd4311f949e0a28308cfa536af0f089c4730b608b6d4796560927d4944ddfd15

Contents?: true

Size: 946 Bytes

Versions: 3

Compression:

Stored size: 946 Bytes

Contents

# encoding: utf-8

Given(/^we use "(.*?)" bowler$/) do |f|
#  @f = "config/bowlers/#{f}.yaml"
  @bowler = Qipowl::Ruler.new_bowler f
end

When(/^the input string is "(.*?)"$/) do |input|
  @input = input
end

When(/^the input string is$/) do |input|
  @input = input
end

When(/^the execute method is called on bowler$/) do
  @result = @bowler.execute @input
end

When(/^rule "(.*?)" is added to mapping as "(.*?)" in "(.*?)" section with "(.*?)" enclosure$/) do |key, val, section, encl|
  @bowler.add_entity section, key, val, encl
end

When(/^rule "(.*?)" is removed from mapping$/) do |key|
  @bowler.remove_entity key
end

Then(/^bowler has all the method aliases$/) do
  puts @bowler.class.instance_methods(false)
  puts '='*60
  @bowler.class.constants(false).each { |c|
    puts "Constant: #{c}"
    puts @bowler.class.const_get(c)
    puts '-'*60
  }
end

Then(/^the output is "(.*?)"$/) do |result|
  expect(@result).to eq(result)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qipowl-0.9.3 features/step_definitions/bowler_steps.rb
qipowl-0.9.2 features/step_definitions/bowler_steps.rb
qipowl-0.9.1 features/step_definitions/bowler_steps.rb