Sha256: 9f690932a6e94bb597e4fea150203c7304ff655ba105a8da9be2a457b64b8d15
Contents?: true
Size: 1005 Bytes
Versions: 1
Compression:
Stored size: 1005 Bytes
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 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.8 | features/step_definitions/data_magic_steps.rb |