pickle 0.1.21 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ == 0.1.22 - 7 Nov 2009
2
+
3
+ * 2 minor enhancements
4
+ * Improved docs to include instructions for FactoryGirl users, and linksresources for pickle users
5
+ * Ruby 1.9.1 compatibility changes
6
+
7
+
1
8
  == 0.1.21
2
9
 
3
10
  * 1 minor enhancement
@@ -7,9 +7,17 @@ References to the models are stored in the current world, not necessarily for th
7
7
  (although you could use it for that), but for enabling easy reference to urls, and for
8
8
  building complex givens which require a bunch of models collaborating
9
9
 
10
- == CI
10
+ == Resources
11
11
 
12
- It's tested against all stable branches of 2.x rails, and edge, with the latest versions of rspec, cucumber, factory_girl, machinist.
12
+ <b>Github</b> for code: http://github.com/ianwhite/pickle
13
+
14
+ <b>API</b> docs: http://ianwhite.github.com/pickle/doc
15
+
16
+ <b>Google group</b> for questions: http://groups.google.com/group/pickle-cucumber
17
+
18
+ <b>Lighthouse</b> for bugs: http://ianwhite.lighthouseapp.com/projects/25941-pickle
19
+
20
+ <b>Railscast</b> presentation: http://railscasts.com/episodes/186-pickle-with-cucumber
13
21
 
14
22
  == Install
15
23
 
@@ -18,15 +26,22 @@ Install pickle either as a rails plugin, or a gem
18
26
  # gem from gemcutter
19
27
  sudo gem install pickle
20
28
 
29
+ # gem dependency (in config/environments/cucumber.rb)
30
+ gem 'pickle'
31
+
21
32
  # plugin
22
33
  script/plugin install git://github.com/ianwhite/pickle.git
23
34
 
24
35
  # or, plugin as submodule
25
36
  git submodule add git://github.com/ianwhite/pickle.git vendor/plugins/pickle
26
37
 
38
+ == CI
39
+
40
+ It's tested against all stable branches of 2.x rails, and edge, with the latest versions of rspec, cucumber, factory_girl, machinist.
41
+
27
42
  == Contributors
28
43
 
29
- The following people have Pickle better:
44
+ The following people have made Pickle better:
30
45
 
31
46
  * {Nick Rutherford}[http://github.com/nruth]
32
47
  * Tobi Knaup
@@ -73,11 +88,20 @@ In your <tt>features/support/env.rb</tt> add the following lines at the bottom
73
88
  require "#{Rails.root}/spec/blueprints" # or wherever they live
74
89
  Before { Sham.reset } # reset Shams in between scenarios
75
90
 
91
+ ==== FactoryGirl: make sure factories are loaded
92
+
93
+ In your config/environments/cucumber.rb file, make sure the factory-girl gem is included (unless it's installed as a plugin).
94
+
95
+ If that doesn't solve loading issues then require your factories.rb file directly in a file called 'features/support/factory_girl.rb'
96
+
97
+ # example features/support/factory_girl.rb
98
+ require File.dirname(__FILE__) + '/../../spec/factories'
99
+
76
100
  === Configuring Pickle
77
101
 
78
102
  You can tell pickle to use another factory adapter (see Pickle::Adapter), or
79
103
  create mappings from english expressions to pickle model names. You can also
80
- override many of the options on the Pickle::Config object if you so choose
104
+ override many of the options on the Pickle::Config object if you so choose
81
105
 
82
106
  require 'pickle/world'
83
107
 
@@ -85,6 +109,10 @@ override many of the options on the Pickle::Config object if you so choose
85
109
  config.adapters = [:machinist, YourOwnAdapterClass]
86
110
  config.map 'me', 'myself', 'my', 'I', :to => 'user: "me"'
87
111
  end
112
+
113
+ Out of the box pickle looks for machinist, then factory-girl, then finally active-record 'factories'.
114
+ If you find that your steps aren't working with your factories, it's probably the case that your factory
115
+ setup is not being included in your cucumber environment (see comments above regarding machinist and factory-girl).
88
116
 
89
117
  == API
90
118
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.21
1
+ 0.1.22
@@ -58,13 +58,13 @@ module Pickle
58
58
  end
59
59
 
60
60
  def match_predicate
61
- "(?:#{config.predicates.map{|m| m.sub(/\?$/,'').gsub('_','[_ ]')}.join('|')})"
61
+ "(?:#{config.predicates.map{|m| m.to_s.sub(/\?$/,'').gsub('_','[_ ]')}.join('|')})"
62
62
  end
63
63
 
64
64
  # create capture analogues of match methods
65
65
  instance_methods.select{|m| m =~ /^match_/}.each do |method|
66
66
  eval <<-end_eval
67
- def #{method.sub('match_', 'capture_')} # def capture_field
67
+ def #{method.to_s.sub('match_', 'capture_')} # def capture_field
68
68
  "(" + #{method} + ")" # "(" + match_field + ")"
69
69
  end # end
70
70
  end_eval
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pickle}
8
- s.version = "0.1.21"
8
+ s.version = "0.1.22"
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-10-28}
12
+ s.date = %q{2009-11-07}
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 = [
@@ -79,7 +79,7 @@ Gem::Specification.new do |s|
79
79
  s.homepage = %q{http://github.com/ianwhite/pickle/tree}
80
80
  s.rdoc_options = ["--charset=UTF-8"]
81
81
  s.require_paths = ["lib"]
82
- s.rubygems_version = %q{1.3.4}
82
+ s.rubygems_version = %q{1.3.5}
83
83
  s.summary = %q{Easy model creation and reference in your cucumber features}
84
84
  s.test_files = [
85
85
  "spec/lib/pickle_adapter_spec.rb",
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.1.21
4
+ version: 0.1.22
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-10-28 00:00:00 +00:00
12
+ date: 2009-11-07 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements: []
106
106
 
107
107
  rubyforge_project:
108
- rubygems_version: 1.3.4
108
+ rubygems_version: 1.3.5
109
109
  signing_key:
110
110
  specification_version: 3
111
111
  summary: Easy model creation and reference in your cucumber features