Sha256: 9f4877d4449d7ecb41e77361ae553037b7b5cf920cc9b058ab61d06bc8451e5a
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
class TestClass include DataMagic end Given /^I have read the yaml file from features\/yaml$/ do DataMagic.yml_directory = 'features/yaml' DataMagic.load "example.yml" end Given /^I have read the default yaml file from the default location$/ do 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 be (\d+) characters long$/ do |key, length| @data[key].length.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
data_magic-0.9 | features/step_definitions/data_magic_steps.rb |