eac_rails_gem_support 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7f28694f2816be105b4a9ad99a509894c0ef93cc44799f46a288b10dadff69f
|
4
|
+
data.tar.gz: 2ae43a634dcc87ca9cbb9fb22fe4c7e0c00cfaa88f6202aa9acd51144e5ebd5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ca045ef2cb5f4101ee66ca0d48fde679812a0f06647c1b53bb5ab1e2b4a5b5ac30a55f07004e20c863f70e87ea08f985c680c363a381cb4105564748419ce4c
|
7
|
+
data.tar.gz: 3c931401695a187fabfaa430eaf21f0e1cd0135afd5d35f04a1845bfaabec7e2d7faadd2525962f8a40ad5b1c1f4b74a34aa19b054a2eefaaa1f2019259b09bd
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacRailsGemSupport
|
4
|
+
module Rspec
|
5
|
+
module MinitestSupport
|
6
|
+
def assert_difference(code, message = nil, compare_method = :not_to, &block)
|
7
|
+
before_value = assert_difference_call(code)
|
8
|
+
block.call
|
9
|
+
after_value = assert_difference_call(code)
|
10
|
+
expect(after_value).send(compare_method, eq(before_value), message)
|
11
|
+
end
|
12
|
+
|
13
|
+
def assert_no_difference(code, message = nil, &block)
|
14
|
+
assert_difference(code, message, :to, &block)
|
15
|
+
end
|
16
|
+
|
17
|
+
def assert_equal(expected_value, actual_value, message = nil)
|
18
|
+
expect(actual_value).to eq(expected_value), message
|
19
|
+
end
|
20
|
+
|
21
|
+
def assert_not(expected_value, message = nil)
|
22
|
+
expect(expected_value).to be_falsy, message
|
23
|
+
end
|
24
|
+
|
25
|
+
def assert_not_equal(expected_value, actual_value, message = nil)
|
26
|
+
expect(actual_value).not_to eq(expected_value), message
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def assert_difference_call(code)
|
32
|
+
if code.is_a?(::Proc)
|
33
|
+
code.call
|
34
|
+
elsif code.is_a?(::String)
|
35
|
+
eval(code) # rubocop:disable Security/Eval
|
36
|
+
else
|
37
|
+
raise "Unmapped type for \"#{code}\""
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'eac_rails_gem_support/rspec/minitest_support'
|
3
4
|
require 'eac_ruby_utils/core_ext'
|
4
5
|
|
5
6
|
module EacRailsGemSupport
|
@@ -9,13 +10,18 @@ module EacRailsGemSupport
|
|
9
10
|
require_sub __FILE__, include_modules: true
|
10
11
|
|
11
12
|
def self.extended(obj)
|
13
|
+
obj.setup_minitest_support
|
12
14
|
obj.singleton_class.include(::EacRubyUtils::SimpleCache)
|
13
15
|
obj.setup_rails_env
|
14
16
|
return unless obj.setup_rails_app
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
%w[fixtures capybara factory_bot].each do |item|
|
19
|
+
obj.send("setup_#{item}")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def setup_minitest_support
|
24
|
+
rspec_config.include ::EacRailsGemSupport::Rspec::MinitestSupport
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_rails_gem_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-eac_ruby_base1
|
@@ -16,33 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.20'
|
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
|
-
version: '0.
|
26
|
+
version: '0.20'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.37'
|
31
34
|
- - ">="
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
36
|
+
version: 3.37.1
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '3.37'
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: 3.37.1
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: eac_ruby_gem_support
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.5'
|
54
|
+
- - ">="
|
46
55
|
- !ruby/object:Gem::Version
|
47
56
|
version: 0.5.1
|
48
57
|
type: :runtime
|
@@ -50,6 +59,9 @@ dependencies:
|
|
50
59
|
version_requirements: !ruby/object:Gem::Requirement
|
51
60
|
requirements:
|
52
61
|
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0.5'
|
64
|
+
- - ">="
|
53
65
|
- !ruby/object:Gem::Version
|
54
66
|
version: 0.5.1
|
55
67
|
- !ruby/object:Gem::Dependency
|
@@ -58,20 +70,20 @@ dependencies:
|
|
58
70
|
requirements:
|
59
71
|
- - "~>"
|
60
72
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
73
|
+
version: '0.102'
|
62
74
|
- - ">="
|
63
75
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
76
|
+
version: 0.102.1
|
65
77
|
type: :runtime
|
66
78
|
prerelease: false
|
67
79
|
version_requirements: !ruby/object:Gem::Requirement
|
68
80
|
requirements:
|
69
81
|
- - "~>"
|
70
82
|
- !ruby/object:Gem::Version
|
71
|
-
version: '0.
|
83
|
+
version: '0.102'
|
72
84
|
- - ">="
|
73
85
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
86
|
+
version: 0.102.1
|
75
87
|
- !ruby/object:Gem::Dependency
|
76
88
|
name: eac_templates
|
77
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,16 +108,16 @@ dependencies:
|
|
96
108
|
name: factory_bot_rails
|
97
109
|
requirement: !ruby/object:Gem::Requirement
|
98
110
|
requirements:
|
99
|
-
- - "
|
111
|
+
- - "~>"
|
100
112
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
113
|
+
version: '6.2'
|
102
114
|
type: :runtime
|
103
115
|
prerelease: false
|
104
116
|
version_requirements: !ruby/object:Gem::Requirement
|
105
117
|
requirements:
|
106
|
-
- - "
|
118
|
+
- - "~>"
|
107
119
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
120
|
+
version: '6.2'
|
109
121
|
- !ruby/object:Gem::Dependency
|
110
122
|
name: rails
|
111
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,6 +125,9 @@ dependencies:
|
|
113
125
|
- - "~>"
|
114
126
|
- !ruby/object:Gem::Version
|
115
127
|
version: 5.2.8
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 5.2.8.1
|
116
131
|
type: :runtime
|
117
132
|
prerelease: false
|
118
133
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -120,34 +135,49 @@ dependencies:
|
|
120
135
|
- - "~>"
|
121
136
|
- !ruby/object:Gem::Version
|
122
137
|
version: 5.2.8
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: 5.2.8.1
|
123
141
|
- !ruby/object:Gem::Dependency
|
124
142
|
name: rspec-rails
|
125
143
|
requirement: !ruby/object:Gem::Requirement
|
126
144
|
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '5.1'
|
127
148
|
- - ">="
|
128
149
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
150
|
+
version: 5.1.2
|
130
151
|
type: :runtime
|
131
152
|
prerelease: false
|
132
153
|
version_requirements: !ruby/object:Gem::Requirement
|
133
154
|
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '5.1'
|
134
158
|
- - ">="
|
135
159
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
160
|
+
version: 5.1.2
|
137
161
|
- !ruby/object:Gem::Dependency
|
138
162
|
name: sqlite3
|
139
163
|
requirement: !ruby/object:Gem::Requirement
|
140
164
|
requirements:
|
165
|
+
- - "~>"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '1.4'
|
141
168
|
- - ">="
|
142
169
|
- !ruby/object:Gem::Version
|
143
|
-
version:
|
170
|
+
version: 1.4.4
|
144
171
|
type: :runtime
|
145
172
|
prerelease: false
|
146
173
|
version_requirements: !ruby/object:Gem::Requirement
|
147
174
|
requirements:
|
175
|
+
- - "~>"
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '1.4'
|
148
178
|
- - ">="
|
149
179
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
180
|
+
version: 1.4.4
|
151
181
|
description:
|
152
182
|
email:
|
153
183
|
executables: []
|
@@ -159,6 +189,7 @@ files:
|
|
159
189
|
- lib/eac_rails_gem_support/patches/object/template.rb
|
160
190
|
- lib/eac_rails_gem_support/rspec.rb
|
161
191
|
- lib/eac_rails_gem_support/rspec/appendable_rails_app.rb
|
192
|
+
- lib/eac_rails_gem_support/rspec/minitest_support.rb
|
162
193
|
- lib/eac_rails_gem_support/rspec/setup.rb
|
163
194
|
- lib/eac_rails_gem_support/rspec/setup/capybara.rb
|
164
195
|
- lib/eac_rails_gem_support/rspec/setup/factory_bot.rb
|