ianwhite-pickle 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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