pickle 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -2
  3. data/.travis.yml +24 -4
  4. data/History.txt +55 -34
  5. data/README.md +15 -26
  6. data/Rakefile.d/cucumber.rake +13 -4
  7. data/Rakefile.d/repoclean.rake +3 -0
  8. data/features/app/app.rb +7 -7
  9. data/features/app/factories.rb +5 -5
  10. data/features/email/email.feature +1 -0
  11. data/features/step_definitions/email_steps.rb +1 -0
  12. data/features/step_definitions/extra_email_steps.rb +5 -5
  13. data/features/step_definitions/pickle_steps.rb +1 -0
  14. data/features/support/email.rb +1 -0
  15. data/features/support/env.rb +9 -3
  16. data/features/support/pickle.rb +2 -2
  17. data/gemfiles/Gemfile-rails.5.0.x +12 -0
  18. data/gemfiles/Gemfile-rails.5.1.x +10 -0
  19. data/gemfiles/Gemfile-rails.5.2.x +11 -0
  20. data/gemfiles/Gemfile-rails.5.2.x-cukes-4 +11 -0
  21. data/gemfiles/Gemfile-rails.5.2.x-cukes-5 +12 -0
  22. data/gemfiles/Gemfile-rails.6.0.x +10 -0
  23. data/gemfiles/Gemfile-rails.6.0.x-cukes-5 +11 -0
  24. data/gemfiles/Gemfile-rails.edge +9 -0
  25. data/lib/pickle.rb +0 -1
  26. data/lib/pickle/adapter.rb +9 -11
  27. data/lib/pickle/config.rb +1 -1
  28. data/lib/pickle/path.rb +1 -1
  29. data/lib/pickle/session.rb +15 -18
  30. data/lib/pickle/session/parser.rb +11 -9
  31. data/lib/pickle/version.rb +1 -1
  32. data/pickle.gemspec +9 -8
  33. data/rails_generators/pickle/templates/pickle.rb +2 -2
  34. data/spec/pickle/adapter_spec.rb +19 -19
  35. data/spec/pickle/config_spec.rb +9 -9
  36. data/spec/pickle/email_spec.rb +1 -1
  37. data/spec/pickle/path_spec.rb +37 -18
  38. data/spec/pickle/session_spec.rb +5 -5
  39. data/spec/spec_helper.rb +6 -1
  40. metadata +52 -56
  41. data/Gemfile +0 -3
  42. data/Gemfile.lock.development +0 -158
  43. data/features/step_definitions/email_steps.rb +0 -65
  44. data/features/step_definitions/pickle_steps.rb +0 -105
  45. data/features/support/email.rb +0 -21
  46. data/init.rb +0 -0
@@ -1,13 +1,13 @@
1
1
  # Factories
2
- require 'factory_girl'
2
+ require 'factory_bot'
3
3
 
4
- FactoryGirl.define do
4
+ FactoryBot.define do
5
5
  sequence :fork_name do |n|
6
6
  "fork %d04" % n
7
7
  end
8
8
 
9
9
  factory :fork do |f|
10
- f.name { FactoryGirl.generate(:fork_name) }
10
+ f.name { FactoryBot.generate(:fork_name) }
11
11
  end
12
12
 
13
13
  factory :tine do |t|
@@ -16,10 +16,10 @@ FactoryGirl.define do
16
16
 
17
17
  factory :rusty_tine, :class => Tine do |t|
18
18
  t.association :fork
19
- t.rusty true
19
+ t.rusty { true }
20
20
  end
21
21
 
22
22
  factory :fancy_fork, :class => Fork do |t|
23
- t.name { "Fancy " + FactoryGirl.generate(:fork_name) }
23
+ t.name { "Fancy " + FactoryBot.generate(:fork_name) }
24
24
  end
25
25
  end
@@ -1,3 +1,4 @@
1
+ @wip
1
2
  Feature: I can test emails are sent
2
3
  In order write features with emails as outcomes
3
4
  As a feature writer
@@ -0,0 +1 @@
1
+ ../../rails_generators/pickle/templates/email_steps.rb
@@ -1,12 +1,12 @@
1
1
  Given(/^an email "(.*?)" with body: "(.*?)" is delivered to (.+?)$/) do |subject, body, to|
2
- Notifier.email(to, subject, body).deliver
2
+ Notifier.email(to, subject, body).deliver_now
3
3
  end
4
4
 
5
5
  Given(/^an email with a link "(.+?)" to (.+?) is delivered to (.+?)$/) do |text, page, to|
6
- body = "some text <a href='http://example.com/#{path_to(page)}'>#{text}</a> more text"
7
- Notifier.email(to, "example", body).deliver
6
+ body = "some text <a href='http://example.com/#{path_to(page)}'>#{text}</a> more text"
7
+ Notifier.email(to, "example", body).deliver_now
8
8
  end
9
9
 
10
10
  Given(/^#{capture_model}'s email is delivered$/) do |model|
11
- Notifier.user_email(model!(model)).deliver
12
- end
11
+ Notifier.user_email(model!(model)).deliver_now
12
+ end
@@ -0,0 +1 @@
1
+ ../../rails_generators/pickle/templates/pickle_steps.rb
@@ -0,0 +1 @@
1
+ ../../rails_generators/pickle/templates/email.rb
@@ -1,14 +1,20 @@
1
1
  # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
- # It is recommended to regenerate this file in the future when you upgrade to a
3
- # newer version of cucumber-rails. Consider adding your own code to a new file
2
+ # It is recommended to regenerate this file in the future when you upgrade to a
3
+ # newer version of cucumber-rails. Consider adding your own code to a new file
4
4
  # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
5
  # files.
6
6
 
7
7
  ENV["RAILS_ENV"] ||= "test"
8
8
  ENV["RAILS_ROOT"] ||= File.expand_path(File.dirname(__FILE__) + '/../../cucumber_test_app')
9
9
 
10
+ Bundler.setup
11
+
12
+ require 'simplecov'
13
+ require 'codecov'
14
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
15
+
10
16
  require 'capybara'
11
17
  require 'cucumber/rails'
12
18
  Capybara.default_selector = :css
13
19
  ActionController::Base.allow_rescue = false
14
- DatabaseCleaner.strategy = :truncation
20
+ DatabaseCleaner.strategy = :truncation
@@ -7,9 +7,9 @@
7
7
  # require 'machinist/active_record' # or your chosen adaptor
8
8
  # require File.dirname(__FILE__) + '/../../spec/blueprints' # or wherever your blueprints are
9
9
  #
10
- # For FactoryGirl add: features/support/factory_girl.rb
10
+ # For FactoryBot add: features/support/factory_bot.rb
11
11
  #
12
- # require 'factory_girl'
12
+ # require 'factory_bot'
13
13
  # require File.dirname(__FILE__) + '/../../spec/factories' # or wherever your factories are
14
14
  #
15
15
  # For Fabrication, just include it in the adapter list when configuring pickle as explained below.
@@ -0,0 +1,12 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "rails", "~> 5.0.2"
9
+ gem "cucumber", "~> 3.2.0"
10
+ gem "sqlite3", "~> 1.3.6"
11
+
12
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -0,0 +1,10 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "rails", "~> 5.1.0"
9
+ gem "cucumber", "~> 3.2"
10
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -0,0 +1,11 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "rails", "~> 5.2.0"
9
+ gem "cucumber", "~> 3.2.0"
10
+
11
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -0,0 +1,11 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "rails", "~> 5.2.0"
9
+ gem "cucumber", "~> 4.0"
10
+
11
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -0,0 +1,12 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "rails", "~> 5.2.0"
9
+ gem "cucumber", "~> 5.0"
10
+ gem "cucumber-rails", github: 'cucumber/cucumber-rails', branch: 'cucumber5'
11
+
12
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -0,0 +1,10 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "activerecord", "~> 6.0.0"
9
+ gem "cucumber", "~> 4.1"
10
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -0,0 +1,11 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "rails", "~> 6.0.0"
9
+ gem "cucumber", "~> 5.0"
10
+ gem "cucumber-rails", github: 'cucumber/cucumber-rails', branch: 'cucumber5'
11
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -0,0 +1,9 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Bundler 1.x default to insecure http:// for github: shortcut
4
+ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
5
+
6
+ gemspec :path => ".."
7
+
8
+ gem "rails", :github => "rails/rails"
9
+ gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
@@ -1,4 +1,3 @@
1
- require 'active_support'
2
1
  require 'pickle/version'
3
2
  require 'pickle/adapter'
4
3
  require 'pickle/config'
@@ -1,5 +1,3 @@
1
- require 'active_support/core_ext'
2
-
3
1
  module Pickle
4
2
  # Abstract Factory adapter class, if you have a factory type setup, you
5
3
  # can easily create an adaptor to make it work with Pickle.
@@ -100,11 +98,11 @@ module Pickle
100
98
  end
101
99
 
102
100
  # factory-girl adapter
103
- class FactoryGirl < Adapter
101
+ class FactoryBot < Adapter
104
102
  def self.factories
105
- if defined? ::FactoryGirl
103
+ if defined? ::FactoryBot
106
104
  factories = []
107
- ::FactoryGirl.factories.each do |factory|
105
+ ::FactoryBot.factories.each do |factory|
108
106
  factory.names.each do |name|
109
107
  factories << new(factory, name)
110
108
  end
@@ -116,7 +114,7 @@ module Pickle
116
114
  end
117
115
 
118
116
  def initialize(factory, factory_name)
119
- if defined? ::FactoryGirl
117
+ if defined? ::FactoryBot
120
118
  @klass, @name = factory.build_class, factory_name.to_s
121
119
  else
122
120
  @klass, @name = factory.build_class, factory.factory_name.to_s
@@ -124,16 +122,16 @@ module Pickle
124
122
  end
125
123
 
126
124
  def create(attrs = {})
127
- if defined? ::FactoryGirl
128
- ::FactoryGirl.create(@name, attrs)
125
+ if defined? ::FactoryBot
126
+ ::FactoryBot.create(@name, attrs)
129
127
  else
130
128
  Factory(@name, attrs)
131
129
  end
132
130
  end
133
131
 
134
132
  def build(attrs = {})
135
- if defined? ::FactoryGirl
136
- ::FactoryGirl.build(@name, attrs)
133
+ if defined? ::FactoryBot
134
+ ::FactoryBot.build(@name, attrs)
137
135
  else
138
136
  Factory.build(@name, attrs)
139
137
  end
@@ -153,7 +151,7 @@ module Pickle
153
151
 
154
152
  def initialize(factory)
155
153
  if defined? ::Fabrication
156
- @klass, @name = factory[1].klass, factory[0].to_s
154
+ @klass, @name = factory[1].send(:klass), factory[0].to_s
157
155
  end
158
156
  end
159
157
 
@@ -11,7 +11,7 @@ module Pickle
11
11
  end
12
12
 
13
13
  def adapters
14
- @adapters ||= [:machinist, :factory_girl, :fabrication, :orm]
14
+ @adapters ||= [:machinist, :factory_bot, :fabrication, :orm]
15
15
  end
16
16
 
17
17
  def adapter_classes
@@ -36,7 +36,7 @@ module Pickle
36
36
  def pickle_path_for_resources_action_segment(resources, action, segment)
37
37
  action.blank? or action = action.downcase.gsub(' ','_')
38
38
  segment.blank? or segment = segment.downcase.gsub(' ','_')
39
- resource_names = resources.map{|s| s.is_a?(Symbol) ? s.to_s : s.class.name.underscore}.join("_")
39
+ resource_names = resources.map{|s| s.is_a?(Symbol) ? s.to_s : s.class.name.underscore.gsub('/', '_')}.join("_")
40
40
  models = resources.reject{|s| s.is_a?(Symbol)}
41
41
  parts = [action, resource_names, segment].reject(&:blank?)
42
42
  send("#{parts.join('_')}_path", *models) rescue nil
@@ -1,5 +1,19 @@
1
1
  module Pickle
2
2
  module Session
3
+ module PickleParserMethods
4
+ def method_missing(method, *args, &block)
5
+ if pickle_parser.respond_to?(method)
6
+ pickle_parser.send(method, *args, &block)
7
+ else
8
+ super(method, *args, &block)
9
+ end
10
+ end
11
+
12
+ def respond_to?(method, include_private = false)
13
+ super(method, include_private) || pickle_parser.respond_to?(method, include_private)
14
+ end
15
+ end
16
+
3
17
  class ModelNotKnownError < RuntimeError
4
18
  attr_reader :name
5
19
 
@@ -27,12 +41,7 @@ module Pickle
27
41
 
28
42
  protected
29
43
  def proxy_to_pickle_parser(world_class)
30
- world_class.class_eval do
31
- unless methods.include?('method_missing_with_pickle_parser')
32
- alias_method_chain :method_missing, :pickle_parser
33
- alias_method_chain :respond_to?, :pickle_parser
34
- end
35
- end
44
+ world_class.send(:prepend, PickleParserMethods)
36
45
  end
37
46
  end
38
47
 
@@ -153,10 +162,6 @@ module Pickle
153
162
  end
154
163
  end
155
164
 
156
- def respond_to_with_pickle_parser?(method, include_private = false)
157
- respond_to_without_pickle_parser?(method, include_private) || pickle_parser.respond_to?(method, include_private)
158
- end
159
-
160
165
  protected
161
166
  def create_or_build_model(method, count, pickle_ref, fields = nil)
162
167
  factory, label = *parse_model(pickle_ref)
@@ -171,14 +176,6 @@ module Pickle
171
176
  end
172
177
  end
173
178
 
174
- def method_missing_with_pickle_parser(method, *args, &block)
175
- if pickle_parser.respond_to?(method)
176
- pickle_parser.send(method, *args, &block)
177
- else
178
- method_missing_without_pickle_parser(method, *args, &block)
179
- end
180
- end
181
-
182
179
  def pickle_parser=(parser)
183
180
  parser.session = self
184
181
  @pickle_parser = parser
@@ -2,8 +2,18 @@ module Pickle
2
2
  module Session
3
3
  # add ability to parse model names as fields, using a session
4
4
  module Parser
5
+ module ParseFieldWithModel
6
+ def parse_field(field)
7
+ if session && field =~ /^(\w+): #{capture_model}$/
8
+ {$1 => session.model!($2)}
9
+ else
10
+ super(field)
11
+ end
12
+ end
13
+ end
14
+
5
15
  def self.included(parser_class)
6
- parser_class.alias_method_chain :parse_field, :model
16
+ parser_class.send(:prepend, ParseFieldWithModel)
7
17
  end
8
18
 
9
19
  attr_accessor :session
@@ -12,14 +22,6 @@ module Pickle
12
22
  "(?:\\w+: (?:#{match_model}|#{match_value}))"
13
23
  end
14
24
 
15
- def parse_field_with_model(field)
16
- if session && field =~ /^(\w+): #{capture_model}$/
17
- {$1 => session.model!($2)}
18
- else
19
- parse_field_without_model(field)
20
- end
21
- end
22
-
23
25
  def parse_hash(hash)
24
26
  hash.inject({}) do |parsed, (key, val)|
25
27
  if session && val =~ /^#{capture_model}$/
@@ -1,3 +1,3 @@
1
1
  module Pickle
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -6,10 +6,10 @@ Gem::Specification.new do |s|
6
6
  s.version = Pickle::VERSION.dup
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.licenses = ["MIT"]
9
- s.authors = ["Ian White", "James Le Cuirot"]
9
+ s.authors = ["Ian White", "James Le Cuirot", "Mathieu Jobin"]
10
10
  s.description = "Easy model creation and reference in your cucumber features"
11
11
  s.summary = "Easy model creation and reference in your cucumber features."
12
- s.email = ["ian.w.white@gmail.com", "chewi@aura-online.co.uk"]
12
+ s.email = ["ian.w.white@gmail.com", "chewi@aura-online.co.uk", "mathieu.jobin@gmail.com"]
13
13
  s.homepage = "https://github.com/ianwhite/pickle"
14
14
 
15
15
  s.rubyforge_project = "pickle"
@@ -18,21 +18,22 @@ Gem::Specification.new do |s|
18
18
  s.files = `git ls-files`.split("\n")
19
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
20
  s.require_paths = ["lib"]
21
-
22
- s.add_dependency "cucumber", ">=0.8"
21
+
22
+ s.add_dependency "cucumber", ">=3.0", "< 6.0"
23
23
  s.add_dependency "rake"
24
-
24
+
25
25
  s.add_development_dependency "rack"
26
26
  s.add_development_dependency "bundler"
27
27
  s.add_development_dependency "git"
28
28
  s.add_development_dependency "yard"
29
29
  s.add_development_dependency "rspec-rails", "~>3.0"
30
- s.add_development_dependency "rails", "~>3.1.0"
30
+ s.add_development_dependency "rails", ">= 4.2.0", "< 7.0"
31
31
  s.add_development_dependency "cucumber-rails"
32
- s.add_development_dependency "factory_girl"
32
+ s.add_development_dependency "factory_bot"
33
33
  s.add_development_dependency "fabrication", '~> 2.0'
34
- s.add_development_dependency "machinist", "~>2.0"
34
+ s.add_development_dependency "machinist" # , "~>2.0"
35
35
  s.add_development_dependency "database_cleaner"
36
36
  s.add_development_dependency "capybara"
37
37
  s.add_development_dependency "sqlite3"
38
+ s.add_development_dependency "codecov"
38
39
  end
@@ -7,9 +7,9 @@
7
7
  # require 'machinist/active_record' # or your chosen adaptor
8
8
  # require File.dirname(__FILE__) + '/../../spec/blueprints' # or wherever your blueprints are
9
9
  #
10
- # For FactoryGirl add: features/support/factory_girl.rb
10
+ # For FactoryBot add: features/support/factory_bot.rb
11
11
  #
12
- # require 'factory_girl'
12
+ # require 'factory_bot'
13
13
  # require File.dirname(__FILE__) + '/../../spec/factories' # or wherever your factories are
14
14
  #
15
15
  # For Fabrication, just include it in the adapter list when configuring pickle as explained below.
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  require 'active_record'
4
- require 'factory_girl'
4
+ require 'factory_bot'
5
5
  require 'fabrication'
6
6
  require 'machinist/active_record'
7
7
  require 'pickle/adapters/active_record'
@@ -58,17 +58,17 @@ describe Pickle::Adapter do
58
58
  end
59
59
  end
60
60
 
61
- describe 'FactoryGirl' do
61
+ describe 'FactoryBot' do
62
62
  before do
63
- allow(Pickle::Adapter::FactoryGirl).to receive(:model_classes).and_return([One, One::Two, Three])
64
-
65
- if defined? ::FactoryGirl
66
- @orig_factories = ::FactoryGirl.factories.dup
67
- ::FactoryGirl.factories.clear
68
- ::FactoryGirl::Syntax::Default::DSL.new.factory(:one, :class => One) {}
69
- ::FactoryGirl::Syntax::Default::DSL.new.factory(:two, :class => One::Two) {}
70
- @factory1 = ::FactoryGirl.factories[:one]
71
- @factory2 = ::FactoryGirl.factories[:two]
63
+ allow(Pickle::Adapter::FactoryBot).to receive(:model_classes).and_return([One, One::Two, Three])
64
+
65
+ if defined? ::FactoryBot
66
+ @orig_factories = ::FactoryBot.factories.dup
67
+ ::FactoryBot.factories.clear
68
+ ::FactoryBot::Syntax::Default::DSL.new.factory(:one, :class => One) {}
69
+ ::FactoryBot::Syntax::Default::DSL.new.factory(:two, :class => One::Two) {}
70
+ @factory1 = ::FactoryBot.factories[:one]
71
+ @factory2 = ::FactoryBot.factories[:two]
72
72
  else
73
73
  @orig_factories, Factory.factories = Factory.factories, {}
74
74
  Factory.define(:one, :class => One) {}
@@ -79,23 +79,23 @@ describe Pickle::Adapter do
79
79
  end
80
80
 
81
81
  after do
82
- if defined? ::FactoryGirl
83
- ::FactoryGirl.factories.clear
84
- @orig_factories.each {|f| ::FactoryGirl.factories.add(f) }
82
+ if defined? ::FactoryBot
83
+ ::FactoryBot.factories.clear
84
+ @orig_factories.each {|f| ::FactoryBot.factories.add(f) }
85
85
  else
86
86
  Factory.factories = @orig_factories
87
87
  end
88
88
  end
89
89
 
90
90
  it ".factories should create one for each factory" do
91
- expect(Pickle::Adapter::FactoryGirl).to receive(:new).with(@factory1, @factory1.name).once
92
- expect(Pickle::Adapter::FactoryGirl).to receive(:new).with(@factory2, @factory2.name).once
93
- Pickle::Adapter::FactoryGirl.factories
91
+ expect(Pickle::Adapter::FactoryBot).to receive(:new).with(@factory1, @factory1.name).once
92
+ expect(Pickle::Adapter::FactoryBot).to receive(:new).with(@factory2, @factory2.name).once
93
+ Pickle::Adapter::FactoryBot.factories
94
94
  end
95
95
 
96
96
  describe ".new(factory, factory_name)" do
97
97
  before do
98
- @factory = Pickle::Adapter::FactoryGirl.new(@factory1, @factory1.name)
98
+ @factory = Pickle::Adapter::FactoryBot.new(@factory1, @factory1.name)
99
99
  end
100
100
 
101
101
  it "should have name of factory_name" do
@@ -106,7 +106,7 @@ describe Pickle::Adapter do
106
106
  expect(@factory.klass).to eq(One)
107
107
  end
108
108
 
109
- unless defined? ::FactoryGirl
109
+ unless defined? ::FactoryBot
110
110
  it "#create(attrs) should call Factory(<:key>, attrs)" do
111
111
  expect(Factory).to receive(:create).with("one", {:key => "val"})
112
112
  @factory.create(:key => "val")