pickle 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.2.1 - 1 Dec 2009
2
+
3
+ * 2 minor improvements
4
+ * Allow nil as field value [#14]
5
+ * Added negative email step for delivered to
6
+
7
+
1
8
  == 0.2.0 - 24 Nov 2009
2
9
 
3
10
  * 4 major improvements
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
@@ -1,3 +1,4 @@
1
+ * add 'scope' steps see http://gist.github.com/239570
1
2
  * cleanup path_to_pickle and paths.rb (maybe have poly_pickle_path with same semantics as polymorphic_path, but accepting pickle refs)
2
3
  * fix problem with save_and_open_emails
3
4
  * Translations
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
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
- !attitude_score.nil? && attitude_score > 0
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
@@ -22,7 +22,7 @@ module Pickle
22
22
  end
23
23
 
24
24
  def match_value
25
- "(?:\"#{match_quoted}\"|true|false|[+-]?\\d+(?:\\.\\d+)?)"
25
+ "(?:\"#{match_quoted}\"|nil|true|false|[+-]?\\d+(?:\\.\\d+)?)"
26
26
  end
27
27
 
28
28
  def match_field
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.0"
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-11-24}
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.0
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-11-24 00:00:00 +00:00
12
+ date: 2009-12-01 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15