Sha256: f3018509ce3f4ab213042652399dacf93cea38e3e0abc56a286799072295d175
Contents?: true
Size: 899 Bytes
Versions: 1
Compression:
Stored size: 899 Bytes
Contents
# inject the pickle session into integration session Pickle::Injector.inject Pickle::Session, :into => ActionController::Integration::Session # make some Regexp shortcuts for use in steps MatchModel = Pickle::Parser::Match::Model MatchFields = Pickle::Parser::Match::Fields # start with some obvious steps Given(/^(#{MatchModel}) exists$/) do |name| create_model(name) end Given(/^(#{MatchModel}) exists with (#{MatchFields})$/) do |name, fields| create_model(name, fields) end Then(/^(#{MatchModel}) should exist with (#{MatchFields})$/) do |name, fields| find_model(name, fields).should_not == nil end Then(/^(#{MatchModel}) should be (?:an? )?"(.*?)"$/) do |name, predicate| model(name).should send("be_#{predicate.gsub(' ','_')}") end Then(/^(#{MatchModel}) should not be (?:an? )?"(.*?)"$/) do |name, predicate| model(name).should_not send("be_#{predicate.gsub(' ','_')}") end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ianwhite-pickle-0.1.1 | lib/pickle/steps.rb |