Sha256: 56897fc7073a2f28646d0c95b12fe4c066f3549572a0a82b16af76d6f5eb90d5
Contents?: true
Size: 1.2 KB
Versions: 23
Compression:
Stored size: 1.2 KB
Contents
Then "show me the $object" do |object| raise instance_variable_get("@#{object}").inspect end Then /^the ([^\"]*) list should contain "([^\"]*)"$/ do |object, value| instance_variable_get("@#{object}").should include(value) end Then /^the ([^\"]*) list should not contain "([^\"]*)"$/ do |object, arg1| instance_variable_get("@#{object}").should_not include(arg1) end # the group attribute "name" should be "George" Then /^the ([^\"]*) attribute "([^\"]*)" should be "([^\"]*)"$/ do |object, field, arg1| instance_variable_get("@#{text_to_variable(object)}").send(text_to_variable(field)).should == arg1 end When /^I change the ([^\"]*) attribute "([^\"]*)" to "([^\"]*)"$/ do |object, field, value| instance_variable_get("@#{text_to_variable(object)}").send("#{text_to_variable(field)}=", value) end Then /^the ([^\"]*) list should contain the ([^\"]*) id$/ do |list, object| instance_variable_get("@#{list}").should include(instance_variable_get("@#{object}").id) end Then /^the ([^\"]*) list should not contain the ([^\"]*) id$/ do |list, object| instance_variable_get("@#{list}").should_not include(instance_variable_get("@#{object}").id) end def text_to_variable(object) object.gsub(" ", "_") end
Version data entries
23 entries across 23 versions & 1 rubygems