factory_girl_rspec 2.1.0 → 3.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d0b32cfc8ea3f709914fac9905d4a050667dffc
4
- data.tar.gz: cdc2090412a45b50c97374a1e9c57c742e7b8371
3
+ metadata.gz: 40424ea7e7ad37831da0a0f2237059bd518bc3f4
4
+ data.tar.gz: 75ea5d9def6b7b56c8ce47f8dbc76616e4cb76af
5
5
  SHA512:
6
- metadata.gz: 67b8641e89054fc9105e678b200790b766eb965382d9f86b2a7e94c53b6eba35775b5138c6d80075898978ba8ee782db6b81882213fb4549d9e3b06f49800e85
7
- data.tar.gz: 118d43fb95fce49070ab6dea005c87c3653b97a5935a209d79b5c806deb787597ffb2e562d841bc5ac96186ddc0ed2aae7162cf4708ae661082c6ee52fd834d2
6
+ metadata.gz: 88985e545788807e830942ba94295ed6abf59ef5f4a8759e5a636ae3a2ddc96b950cb0c97deb8c7f3c770d1ad90e3861d98e37d7fc79adc2f508832f1c78a2fe
7
+ data.tar.gz: 143e5561bdd6cd289de670bd04e3fc9141de9b87abbc67a0c12a5e8be938c7e3324a14bd851926a6275e753dca6241d076b916ac0d03510674ad728ab9e40a3e
@@ -1 +1 @@
1
- ruby-2.0.0-p247
1
+ ruby-2.4.2
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - '2.0.0'
data/README.md CHANGED
@@ -1,11 +1,13 @@
1
1
  # factory_girl_rspec
2
2
 
3
- Integrate FactoryGirl fixture initialization into the RSpec DSL.
3
+ [![Build Status](https://travis-ci.org/wireframe/factory_girl_rspec.png?branch=master)](https://travis-ci.org/wireframe/factory_girl_rspec)
4
+
5
+ Integrate FactoryBot fixture initialization into the RSpec DSL.
4
6
 
5
7
  ## Features
6
- * clean and concise DSL for instantiating FactoryGirl fixtures
7
- * easily configure factory variations with FactoryGirl traits or optional parameter hash
8
- * [includes FactoryGirl DSL into main Rspec context to DRY up creation](https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#using-factories)
8
+ * clean and concise DSL for instantiating FactoryBot fixtures
9
+ * easily configure factory variations with FactoryBot traits or optional parameter hash
10
+ * [includes FactoryBot DSL into main Rspec context to DRY up creation](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#using-factories)
9
11
 
10
12
  ## Usage
11
13
 
@@ -15,7 +17,7 @@ Basic usage:
15
17
  # spec/models/user_spec.rb
16
18
  describe User do
17
19
  context 'basic user' do
18
- # instantiate FactoryGirl :user fixture
20
+ # instantiate FactoryBot :user fixture
19
21
  with :user
20
22
  it { user.should be_inactive }
21
23
  it { user.should_not be_happy }
@@ -29,14 +31,14 @@ Advanced usage:
29
31
  # spec/models/user_spec.rb
30
32
  describe User do
31
33
  context 'when user.first_name == nil' do
32
- # instantiate FactoryGirl :user fixture with custom options
34
+ # instantiate FactoryBot :user fixture with custom options
33
35
  with :user, :first_name => nil
34
36
  it { user.should be_inactive }
35
37
  it { user.should_not be_happy }
36
38
  end
37
39
 
38
40
  context 'when user is inactive' do
39
- # instantiate FactoryGirl :user fixture with custom traits
41
+ # instantiate FactoryBot :user fixture with custom traits
40
42
  with :user, :when_inactive
41
43
  it { user_when_inactive.should be_inactive }
42
44
  end
@@ -1,23 +1,23 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "factory_girl/rspec/version"
3
+ require "factory_bot/rspec/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "factory_girl_rspec"
7
- s.version = FactoryGirl::Rspec::VERSION
7
+ s.version = FactoryBot::Rspec::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Ryan Sonnek"]
10
10
  s.email = ["ryan@codecrate.com"]
11
11
  s.homepage = ""
12
- s.summary = %q{integrate factory_girl directly into the RSpec DSL}
13
- s.description = %q{add helper methods to quickly instantiate and assign factory girl fixtures to your test context}
12
+ s.summary = %q{integrate factory_bot directly into the RSpec DSL}
13
+ s.description = %q{add helper methods to quickly instantiate and assign factory bot fixtures to your test context}
14
14
 
15
15
  s.rubyforge_project = "factory_girl_rspec"
16
16
 
17
17
  s.add_runtime_dependency 'rspec', '>= 2.0'
18
- s.add_runtime_dependency 'factory_girl', '>= 2.0'
18
+ s.add_runtime_dependency 'factory_bot', '>= 4.8'
19
19
 
20
- s.add_development_dependency 'sqlite3'
20
+ s.add_development_dependency 'rake'
21
21
 
22
22
  s.files = `git ls-files`.split("\n")
23
23
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -1,10 +1,10 @@
1
- require 'factory_girl'
1
+ require 'factory_bot'
2
2
 
3
- module FactoryGirl
3
+ module FactoryBot
4
4
  module Rspec
5
5
  module Dsl
6
6
  # define an rspec helper method that lazily creates the referenced
7
- # FactoryGirl fixture (via let)
7
+ # FactoryBot fixture (via let)
8
8
  # example usage:
9
9
  # with :user
10
10
  def with(*args)
@@ -12,7 +12,7 @@ module FactoryGirl
12
12
  end
13
13
 
14
14
  # define an rspec helper method that eagerly creates the referenced
15
- # FactoryGirl fixture (via let!)
15
+ # FactoryBot fixture (via let!)
16
16
  # example usage:
17
17
  # with! :user
18
18
  def with!(*args)
@@ -24,7 +24,7 @@ module FactoryGirl
24
24
  def register_factory(method_name, *args)
25
25
  variable_name = args.reject {|arg| arg.is_a?(Hash) }.join('_')
26
26
  send(method_name, variable_name) do
27
- ::FactoryGirl.create *args
27
+ ::FactoryBot.create *args
28
28
  end
29
29
  end
30
30
  end
@@ -0,0 +1,5 @@
1
+ module FactoryBot
2
+ module Rspec
3
+ VERSION = '3.0.0'.freeze
4
+ end
5
+ end
@@ -1,7 +1,7 @@
1
- require 'factory_girl/rspec/dsl'
1
+ require 'factory_bot/rspec/dsl'
2
2
  require 'rspec'
3
3
 
4
4
  RSpec.configure do |config|
5
- config.extend FactoryGirl::Rspec::Dsl
6
- config.include FactoryGirl::Syntax::Methods
5
+ config.extend FactoryBot::Rspec::Dsl
6
+ config.include FactoryBot::Syntax::Methods
7
7
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :user do
3
3
  name 'John Doe'
4
4
 
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe FactoryGirl::Rspec do
3
+ describe FactoryBot::Rspec do
4
4
  describe '.with' do
5
5
  context 'with factory' do
6
6
  with :user
@@ -45,15 +45,15 @@ describe FactoryGirl::Rspec do
45
45
  end
46
46
  end
47
47
 
48
- describe FactoryGirl::Syntax::Methods do
48
+ describe FactoryBot::Syntax::Methods do
49
49
  context 'create' do
50
- it 'is available without FactoryGirl prefix' do
50
+ it 'is available without FactoryBot prefix' do
51
51
  user = create :user
52
52
  expect(user).to_not be_nil
53
53
  end
54
54
  end
55
55
  context 'build' do
56
- it 'is available without FactoryGirl prefix' do
56
+ it 'is available without FactoryBot prefix' do
57
57
  user = build :user
58
58
  expect(user).to_not be_nil
59
59
  end
@@ -1,10 +1,9 @@
1
1
  require 'factory_girl_rspec'
2
2
  require 'models/user'
3
3
 
4
- FactoryGirl.find_definitions
4
+ FactoryBot.find_definitions
5
5
 
6
6
  RSpec.configure do |config|
7
- config.treat_symbols_as_metadata_keys_with_true_values = true
8
7
  config.run_all_when_everything_filtered = true
9
8
  config.filter_run :focus
10
9
 
metadata CHANGED
@@ -1,58 +1,58 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_girl_rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-18 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: factory_girl
28
+ name: factory_bot
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '4.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '4.8'
41
41
  - !ruby/object:Gem::Dependency
42
- name: sqlite3
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: add helper methods to quickly instantiate and assign factory girl fixtures
55
+ description: add helper methods to quickly instantiate and assign factory bot fixtures
56
56
  to your test context
57
57
  email:
58
58
  - ryan@codecrate.com
@@ -60,18 +60,19 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - .gitignore
64
- - .rspec
65
- - .ruby-gemset
66
- - .ruby-version
63
+ - ".gitignore"
64
+ - ".rspec"
65
+ - ".ruby-gemset"
66
+ - ".ruby-version"
67
+ - ".travis.yml"
67
68
  - CONTRIBUTORS.txt
68
69
  - Gemfile
69
70
  - LICENSE.txt
70
71
  - README.md
71
72
  - Rakefile
72
73
  - factory_girl_rspec.gemspec
73
- - lib/factory_girl/rspec/dsl.rb
74
- - lib/factory_girl/rspec/version.rb
74
+ - lib/factory_bot/rspec/dsl.rb
75
+ - lib/factory_bot/rspec/version.rb
75
76
  - lib/factory_girl_rspec.rb
76
77
  - spec/factories/users.rb
77
78
  - spec/factory_girl_rspec_spec.rb
@@ -86,20 +87,20 @@ require_paths:
86
87
  - lib
87
88
  required_ruby_version: !ruby/object:Gem::Requirement
88
89
  requirements:
89
- - - '>='
90
+ - - ">="
90
91
  - !ruby/object:Gem::Version
91
92
  version: '0'
92
93
  required_rubygems_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
- - - '>='
95
+ - - ">="
95
96
  - !ruby/object:Gem::Version
96
97
  version: '0'
97
98
  requirements: []
98
99
  rubyforge_project: factory_girl_rspec
99
- rubygems_version: 2.1.5
100
+ rubygems_version: 2.6.14
100
101
  signing_key:
101
102
  specification_version: 4
102
- summary: integrate factory_girl directly into the RSpec DSL
103
+ summary: integrate factory_bot directly into the RSpec DSL
103
104
  test_files:
104
105
  - spec/factories/users.rb
105
106
  - spec/factory_girl_rspec_spec.rb
@@ -1,5 +0,0 @@
1
- module FactoryGirl
2
- module Rspec
3
- VERSION = "2.1.0"
4
- end
5
- end