ianwhite-pickle 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/pickle/steps.rb DELETED
@@ -1,27 +0,0 @@
1
- # inject the pickle session into integration session
2
- Pickle::Injector.inject Pickle::Session, :into => ActionController::Integration::Session
3
-
4
- # make some Regexp shortcuts for use in steps
5
- MatchModel = Pickle::Parser::Match::Model
6
- MatchFields = Pickle::Parser::Match::Fields
7
-
8
- # start with some obvious steps
9
- Given(/^(#{MatchModel}) exists$/) do |name|
10
- create_model(name)
11
- end
12
-
13
- Given(/^(#{MatchModel}) exists with (#{MatchFields})$/) do |name, fields|
14
- create_model(name, fields)
15
- end
16
-
17
- Then(/^(#{MatchModel}) should exist with (#{MatchFields})$/) do |name, fields|
18
- find_model(name, fields).should_not == nil
19
- end
20
-
21
- Then(/^(#{MatchModel}) should be (?:an? )?"(.*?)"$/) do |name, predicate|
22
- model(name).should send("be_#{predicate.gsub(' ','_')}")
23
- end
24
-
25
- Then(/^(#{MatchModel}) should not be (?:an? )?"(.*?)"$/) do |name, predicate|
26
- model(name).should_not send("be_#{predicate.gsub(' ','_')}")
27
- end