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/History.txt +12 -0
- data/README.textile +70 -39
- data/Todo.txt +0 -5
- data/lib/pickle.rb +17 -45
- data/lib/pickle/adapter.rb +86 -0
- data/lib/pickle/config.rb +51 -0
- data/lib/pickle/injector.rb +11 -11
- data/lib/pickle/parser.rb +31 -44
- data/lib/pickle/parser/matchers.rb +75 -0
- data/lib/pickle/parser/with_session.rb +24 -0
- data/lib/pickle/session.rb +26 -25
- data/lib/pickle/version.rb +9 -0
- data/rails_generators/pickle/pickle_generator.rb +19 -0
- data/rails_generators/pickle/templates/env.rb +9 -0
- data/rails_generators/pickle/templates/pickle_steps.rb +23 -0
- data/spec/lib/pickle_adapter_spec.rb +128 -0
- data/spec/lib/pickle_config_spec.rb +82 -28
- data/spec/lib/pickle_injector_spec.rb +3 -3
- data/spec/lib/pickle_parser_matchers_spec.rb +54 -0
- data/spec/lib/pickle_parser_spec.rb +56 -77
- data/spec/lib/pickle_session_spec.rb +38 -36
- metadata +14 -3
- data/lib/pickle/steps.rb +0 -27
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
|