Sha256: 19e84035a9a4ef53a6e9f188d826c16e99dcef7974fb13a9c5d6095c17ce8ae6
Contents?: true
Size: 732 Bytes
Versions: 6
Compression:
Stored size: 732 Bytes
Contents
Given "I have a form defined as:" do |code| define_form code end Given "I have preloaded the form with data:" do |code| run_test code end When "I build my form from a model:" do |code| run_test code end When /^I initialise (\w+)$/ do |klass| @form = fetch(klass).new end Then /^my form should have a string input "(\w+)"$/ do |name| set @form, name, "my demo string" end Then /^my form should have a date input "(\w+)"$/ do |name| set @form, name, "31/03/2013" end Then "I should be able define a form as:" do |code| define_form code end Then /^my form should have a `(\w+)` (\w+) field$/ do |klass,field| @form ||= fetch("MyCustomFieldForm").new expect( @form.send("__#{field}") ).to be_a fetch(klass) end
Version data entries
6 entries across 6 versions & 1 rubygems