mackarel 0.4.1 → 0.5.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: 16a3a8fd7d83055e6ccca2edf7f57007a6b5b14a
4
- data.tar.gz: 007c2ea8ad6b981256a7bbb0e414f233b5a9bf1d
3
+ metadata.gz: 6cd574d1612f9736edcfdeacef73b7dcaef90614
4
+ data.tar.gz: efb1b0793773d54779c5e00ae78258c9de90f39e
5
5
  SHA512:
6
- metadata.gz: 82541865f5d0f844275e8a6e5cb0d93ce30b1b1534bc8fa264986677850e5e9945511b2115c4aad2c0b37852e0049be4a09b689cbdcb6637f691f38361970276
7
- data.tar.gz: f5a6847af7fb9b8060393f3622d381071042b2de5d3cbbe9f7e719710b44df8697062b748e5f2f047b80e504e759005e5b868d1c861ac8efe9379308e0003346
6
+ metadata.gz: 74474697cbc8ddc00854086bc213c8370a68cbb62326d11776f5eea3830ea32e4edb02cb7bbd945eed1601517fccdabbea4dcb6d6a9accc598badad1171f37f6
7
+ data.tar.gz: 6f5cde10df478825ed53edf03db4fc9c503d3573c53e90b054064e03528a9d571e3fbfa791465060d94aed47725936489c1ef9e836a4542deb259bac6c689598
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Mackarel
2
2
 
3
- Mackarel is a small, hacky extension for acceptance testing in Rails with Capybara and FactoryGirl.
3
+ Mackarel is a small, hacky extension for acceptance testing in Rails with Capybara and FactoryBot.
4
4
 
5
5
  ## Installation
6
6
 
@@ -24,17 +24,17 @@ In your `spec/spec_helper.rb` or `spec/rails_helper.rb` file add:
24
24
  RSpec.configure { |c| config.include Mackarel }
25
25
  ```
26
26
 
27
- If you want to use [FactoryGirl](https://github.com/thoughtbot/factory_girl) as the backend for creating assets, add also:
27
+ If you want to use [FactoryBot](https://github.com/thoughtbot/factory_bot) as the backend for creating assets, add also:
28
28
 
29
29
  ```ruby
30
- Mackarel.config { |c| c.factory = FactoryGirl }
30
+ Mackarel.config { |c| c.factory = FactoryBot }
31
31
  ```
32
32
 
33
33
  ## Usage
34
34
 
35
35
  Mackarel allows you to write acceptance tests in Rails in a readable way without having to deal with things like Cucumber.
36
36
 
37
- It uses feature tests with RSpec. It can use Factorygirl as the factory for models, and Capybara for website testing.
37
+ It uses feature tests with RSpec. It can use FactoryBot as the factory for models, and Capybara for website testing.
38
38
 
39
39
  You can do things like:
40
40
 
@@ -97,8 +97,8 @@ and_there_exists_an(what, *args, **kwargs, &blk)
97
97
  ```
98
98
 
99
99
  These generate objects. By default, they use `Mackarel::BasicFactory`
100
- to do so, but you can change that to use Factorygirl with
101
- `Mackarel.config.factory = Mackarel::FactoryGirl`, or create your own. See later in this README to see how.
100
+ to do so, but you can change that to use FactoryBot with
101
+ `Mackarel.config.factory = Mackarel::FactoryBot`, or create your own. See later in this README to see how.
102
102
 
103
103
 
104
104
  Create and friends figure out what you want to call the created
data/features.rb CHANGED
@@ -10,13 +10,13 @@ module FeatureLang
10
10
 
11
11
  def when_there_exists_a(factory, overrides={})
12
12
  called = overrides.delete(:called) || factory
13
- instance_variable_set("@#{called}", FactoryGirl.create(factory, overrides))
13
+ instance_variable_set("@#{called}", FactoryBot.create(factory, overrides))
14
14
  end
15
15
 
16
16
  def when_there_exist(number, factory, overrides=nil)
17
17
  instance_variable_set("@#{factory}", [])
18
18
  number.times do
19
- instance = FactoryGirl.create(factory, overrides)
19
+ instance = FactoryBot.create(factory, overrides)
20
20
  instance_variable_get("@#{factory}") << instance
21
21
  end
22
22
  end
@@ -0,0 +1,13 @@
1
+ require "factory_bot"
2
+
3
+ module Mackarel::FactoryBot
4
+ extend self
5
+
6
+ def create(what, options)
7
+ FactoryBot.create(what, options)
8
+ end
9
+
10
+ def create_list(what, number, options)
11
+ FactoryBot.create_list(what, number, options)
12
+ end
13
+ end
@@ -1,2 +1,2 @@
1
1
  require "mackarel/factories/basic_factory"
2
- require "mackarel/factories/factory_girl"
2
+ require "mackarel/factories/factory_bot"
@@ -1,3 +1,3 @@
1
1
  module Mackarel
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
data/mackarel.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["paolino.gianrossi@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Simple feature testing for Rails with Capybara and Rspec}
13
- spec.description = %q{Mackarel allows you to write acceptance tests in Rails in a readable way without having to deal with things like Cucumber. It uses feature tests with RSpec, Factorygirl as the factory for models, and generally follows my setup.}
13
+ spec.description = %q{Mackarel allows you to write acceptance tests in Rails in a readable way without having to deal with things like Cucumber. It uses feature tests with RSpec, FactoryBot as the factory for models, and generally follows my setup.}
14
14
  spec.homepage = "https://github.com/paologianrossi/mackarel"
15
15
  spec.license = "MIT"
16
16
 
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency "rspec", "~> 3"
34
34
  spec.add_dependency "capybara", "~> 2"
35
35
  spec.add_dependency "poltergeist", "~> 1"
36
- spec.add_dependency "factory_girl", "~> 4"
37
- spec.add_dependency "activesupport"
36
+ spec.add_dependency "factory_bot", "~> 4"
37
+ spec.add_dependency "activesupport", "~> 5"
38
38
 
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mackarel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paolo Gianrossi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-28 00:00:00.000000000 Z
11
+ date: 2017-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -221,7 +221,7 @@ dependencies:
221
221
  - !ruby/object:Gem::Version
222
222
  version: '1'
223
223
  - !ruby/object:Gem::Dependency
224
- name: factory_girl
224
+ name: factory_bot
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
@@ -238,19 +238,19 @@ dependencies:
238
238
  name: activesupport
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - ">="
241
+ - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '0'
243
+ version: '5'
244
244
  type: :runtime
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ">="
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '0'
250
+ version: '5'
251
251
  description: Mackarel allows you to write acceptance tests in Rails in a readable
252
252
  way without having to deal with things like Cucumber. It uses feature tests with
253
- RSpec, Factorygirl as the factory for models, and generally follows my setup.
253
+ RSpec, FactoryBot as the factory for models, and generally follows my setup.
254
254
  email:
255
255
  - paolino.gianrossi@gmail.com
256
256
  executables: []
@@ -276,7 +276,7 @@ files:
276
276
  - lib/mackarel/core.rb
277
277
  - lib/mackarel/factories.rb
278
278
  - lib/mackarel/factories/basic_factory.rb
279
- - lib/mackarel/factories/factory_girl.rb
279
+ - lib/mackarel/factories/factory_bot.rb
280
280
  - lib/mackarel/version.rb
281
281
  - mackarel.gemspec
282
282
  homepage: https://github.com/paologianrossi/mackarel
@@ -1,13 +0,0 @@
1
- require "factory_girl"
2
-
3
- module Mackarel::FactoryGirl
4
- extend self
5
-
6
- def create(what, options)
7
- FactoryGirl.create(what, options)
8
- end
9
-
10
- def create_list(what, number, options)
11
- FactoryGirl.create_list(what, number, options)
12
- end
13
- end