phillumeny 0.0.1.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phillumeny.rb +3 -1
- data/lib/phillumeny/{factory_girl.rb → factory_bot.rb} +6 -2
- data/lib/phillumeny/version.rb +5 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53f0a80e90261ef7bd81c063c905b8cd84e95cdb
|
4
|
+
data.tar.gz: bb55c8e0eb57052af2bf0dec1cc6c6666c98fcf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8abac74f92990787081850397babe4fecfeeaaf1302186ce0ee64f1c006aca43dcf4e2ddb9f81c1e3504a4f541188becb47e724718139f6524bb5d2514d40f59
|
7
|
+
data.tar.gz: cf740b8212962b00295acb35ae679b2a0a9654b5be2e5064c89021e5d256b064d4eb981502c32f60c990095853f543db425f5cef8dc235a9e6c7922aa7a395ee
|
data/lib/phillumeny.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'phillumeny/version'
|
2
4
|
|
3
|
-
require 'phillumeny/
|
5
|
+
require 'phillumeny/factory_bot'
|
4
6
|
|
5
7
|
# Phillumeny is a collection of RSpec matchers for verbose testers that I use to fills some of the gaps
|
6
8
|
# left by other gems in my current preferred Rails stack
|
@@ -1,8 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'factory_bot'
|
4
|
+
|
1
5
|
module Phillumeny
|
2
6
|
|
3
7
|
# Matchers for supporting the validation of factories along with their
|
4
8
|
# traits and build strategies
|
5
|
-
module
|
9
|
+
module FactoryBot
|
6
10
|
|
7
11
|
# rubocop:disable PredicateName
|
8
12
|
def have_a_valid_factory(name = nil)
|
@@ -35,7 +39,7 @@ module Phillumeny
|
|
35
39
|
|
36
40
|
def matches?(subject)
|
37
41
|
factory_name = @name = @name.nil? ? subject.class.to_s.underscore : @name
|
38
|
-
object = ::
|
42
|
+
object = ::FactoryBot.build(factory_name, @trait)
|
39
43
|
@error_messages = object.errors.full_messages unless object.valid?
|
40
44
|
object.valid?
|
41
45
|
end
|
data/lib/phillumeny/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Phillumeny
|
2
4
|
|
3
5
|
# Nothing to special to see here. Doing my best to follow semantic versioning that conform
|
@@ -5,14 +7,13 @@ module Phillumeny
|
|
5
7
|
module Version
|
6
8
|
|
7
9
|
MAJOR = 0
|
8
|
-
MINOR =
|
9
|
-
PATCH =
|
10
|
+
MINOR = 1
|
11
|
+
PATCH = 0
|
10
12
|
PRERELEASE = nil
|
11
13
|
# PRERELEASE = 'alpha'.freeze
|
12
|
-
BUILD = 0
|
13
14
|
|
14
15
|
def self.to_s
|
15
|
-
[MAJOR, MINOR, PATCH, PRERELEASE
|
16
|
+
[MAJOR, MINOR, PATCH, PRERELEASE].compact.join('.')
|
16
17
|
end
|
17
18
|
|
18
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phillumeny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Deering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -32,7 +32,7 @@ extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- lib/phillumeny.rb
|
35
|
-
- lib/phillumeny/
|
35
|
+
- lib/phillumeny/factory_bot.rb
|
36
36
|
- lib/phillumeny/version.rb
|
37
37
|
homepage: https://github.com/mdeering/phillumeny
|
38
38
|
licenses: []
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.6.14
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Collection of RSpec matchers for verbose testers.
|