Sha256: b998a9be9452b9ea076d24148c1c6440f5c917cc2f6c5c20e6af53359fc9e667
Contents?: true
Size: 673 Bytes
Versions: 3
Compression:
Stored size: 673 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 (\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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
data_magic-0.3 | features/step_definitions/data_magic_steps.rb |
data_magic-0.2 | features/step_definitions/data_magic_steps.rb |
data_magic-0.1 | features/step_definitions/data_magic_steps.rb |