pickle 0.2.0 → 0.2.1
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 +7 -0
- data/README.rdoc +2 -0
- data/Todo.txt +1 -0
- data/VERSION +1 -1
- data/features/app/app.rb +6 -1
- data/features/email/email.feature +1 -0
- data/features/pickle/create_from_active_record.feature +6 -0
- data/features/step_definitions/email_steps.rb +4 -0
- data/lib/pickle/parser/matchers.rb +1 -1
- data/pickle.gemspec +2 -2
- data/rails_generators/pickle/templates/email_steps.rb +4 -0
- data/spec/lib/pickle_parser_matchers_spec.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -11,6 +11,8 @@ building complex givens which require a bunch of models collaborating
|
|
11
11
|
|
12
12
|
<b>Github</b> for code: http://github.com/ianwhite/pickle
|
13
13
|
|
14
|
+
<b>Gemcutter</b> for the gem: http://gemcutter.org/gems/pickle
|
15
|
+
|
14
16
|
<b>API</b> docs: http://ianwhite.github.com/pickle/doc
|
15
17
|
|
16
18
|
<b>Google group</b> for questions: http://groups.google.com/group/pickle-cucumber
|
data/Todo.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/features/app/app.rb
CHANGED
@@ -66,8 +66,13 @@ end
|
|
66
66
|
# No factory or blueprint for this
|
67
67
|
class User < AbstractUser
|
68
68
|
validates_presence_of :name
|
69
|
+
|
69
70
|
def positive_person?
|
70
|
-
!
|
71
|
+
!no_attitude? && attitude_score > 0
|
72
|
+
end
|
73
|
+
|
74
|
+
def no_attitude?
|
75
|
+
attitude_score.nil?
|
71
76
|
end
|
72
77
|
end
|
73
78
|
|
@@ -6,6 +6,7 @@ Feature: I can test emails are sent
|
|
6
6
|
Scenario: Deliver an email, and test it's properties
|
7
7
|
Given an email "Gday" with body: "Gday Mate" is delivered to fred@gmail.com
|
8
8
|
Then 1 email should be delivered
|
9
|
+
And the email should not be delivered to "frood@fmail.com"
|
9
10
|
And the email should have subject: "Gday", to: "fred@gmail.com"
|
10
11
|
And the email should contain "Mate"
|
11
12
|
And the email should not contain "Foo"
|
@@ -26,6 +26,12 @@ Feature: I can easily create models from my blueprints
|
|
26
26
|
And the 1st user should be a positive person
|
27
27
|
And the 2nd user should not be a positive person
|
28
28
|
|
29
|
+
Scenario: I create nil values
|
30
|
+
Given a user exists with name: "Fred", attitude_score: nil
|
31
|
+
Then 1 users should exist with attitude_score: nil
|
32
|
+
And that user should be the first user
|
33
|
+
And that user should have no attitude
|
34
|
+
|
29
35
|
Scenario: create and find using tables
|
30
36
|
Given the following users exist:
|
31
37
|
| name | status |
|
@@ -30,6 +30,10 @@ Then(/^#{capture_email} should be delivered to (.+)$/) do |email_ref, to|
|
|
30
30
|
email(email_ref, "to: \"#{email_for(to)}\"").should_not be_nil
|
31
31
|
end
|
32
32
|
|
33
|
+
Then(/^#{capture_email} should not be delivered to (.+)$/) do |email_ref, to|
|
34
|
+
email(email_ref, "to: \"#{email_for(to)}\"").should be_nil
|
35
|
+
end
|
36
|
+
|
33
37
|
Then(/^#{capture_email} should have #{capture_fields}$/) do |email_ref, fields|
|
34
38
|
email(email_ref, fields).should_not be_nil
|
35
39
|
end
|
data/pickle.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{pickle}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ian White"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-12-01}
|
13
13
|
s.description = %q{Easy model creation and reference in your cucumber features}
|
14
14
|
s.email = %q{ian.w.white@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -30,6 +30,10 @@ Then(/^#{capture_email} should be delivered to (.+)$/) do |email_ref, to|
|
|
30
30
|
email(email_ref, "to: \"#{email_for(to)}\"").should_not be_nil
|
31
31
|
end
|
32
32
|
|
33
|
+
Then(/^#{capture_email} should not be delivered to (.+)$/) do |email_ref, to|
|
34
|
+
email(email_ref, "to: \"#{email_for(to)}\"").should be_nil
|
35
|
+
end
|
36
|
+
|
33
37
|
Then(/^#{capture_email} should have #{capture_fields}$/) do |email_ref, fields|
|
34
38
|
email(email_ref, fields).should_not be_nil
|
35
39
|
end
|
@@ -41,7 +41,7 @@ describe Pickle::Parser::Matchers do
|
|
41
41
|
atom_should_match :match_label, [': "gday"', ': "gday mate"']
|
42
42
|
atom_should_not_match :match_label, [': "gday""', ': gday']
|
43
43
|
|
44
|
-
atom_should_match :match_field, ['foo: "this is the life"', 'bar_man: "and so is this"', 'boolean: false', 'boolean: true', 'numeric: 10', 'numeric: 12.5', 'numeric: +10', 'numeric: +12.5', 'numeric: -10', 'numeric: -12.5']
|
44
|
+
atom_should_match :match_field, ['foo: "this is the life"', 'bar_man: "and so is this"', 'boolean: false', 'boolean: true', 'numeric: 10', 'numeric: 12.5', 'numeric: +10', 'numeric: +12.5', 'numeric: -10', 'numeric: -12.5', 'nil_field: nil']
|
45
45
|
atom_should_not_match :match_field, ['foo bar: "this aint workin"', 'not_numeric: --10', 'not_numeric: -ten']
|
46
46
|
|
47
47
|
atom_should_match :match_fields, ['foo: "bar"', 'foo: "bar", baz: "bah"']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pickle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian White
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-01 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|