Sha256: 260558989c3bfce56d5571482d3f3c4b7db290d56f3fd86df99de6a3a5790373
Contents?: true
Size: 782 Bytes
Versions: 2
Compression:
Stored size: 782 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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
data_magic-0.5 | features/step_definitions/data_magic_steps.rb |
data_magic-0.4 | features/step_definitions/data_magic_steps.rb |