Sha256: 0347e0b248d88a73de6e31603382618f45a3958f7b6cf9eea18b8571c19d049f

Contents?: true

Size: 862 Bytes

Versions: 2

Compression:

Stored size: 862 Bytes

Contents

class TestClass
  include DataMagic
end


Given /^I have read the yaml file$/ do
  DataMagic.load "example.yml"
end

When /^I ask for the data for "(.+)"$/ do |key|
  @data = TestClass.new.data_for key
end


Then /^the value for "(.+)" should be "(.+)"$/ do |key, value|
  @data[key].should == value
end

Then /^the value for "(.+)" should be (true|false)$/ do |key, value|
  @data[key].should == eval(value)
end

Then /^the value for "(.+)" should be (\d+) word|words long$/ do |key, length|
  @data[key].split(' ').size.should == length.to_i
end

Then /^the value for "(.+)" should have a minimum of (\d+) word|wordss$/ do |key, length|
  @data[key].split(' ').size.should >= length.to_i
end

Then /^the value for "(.+)" should exist$/ do |key|
  @data[key].should_not be_nil
end


When /^I load the file "(.+)"$/ do |file_name|
  DataMagic.load file_name
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
data_magic-0.7 features/step_definitions/data_magic_steps.rb
data_magic-0.6 features/step_definitions/data_magic_steps.rb