eac_active_scaffold 0.2.2 → 0.3.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: e5cc04435477ea32bbf31c2189530aba0922da6cbf39cddeb288b34202a0a059
|
4
|
+
data.tar.gz: ddc743b6a429d04f1971a20b4d0ee93b335ed33c8b82c6236a8da5d7f4a4c7b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa40fddc77968d294eca75f46a75b573a34ffa65ce2a48c23f8de8c29cec60b85c2e1cd75610e41fa0696d62c229e9ac40317dcb915a09b94d0143f781979832
|
7
|
+
data.tar.gz: b9e62f051d4103e5f65981997883a6a925356389b0e07487936bd10301d8a2fabe6233277941bd45a956cbc502013ff2fe846397b1a2f51c7a627308ca931f57
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module EacActiveScaffold
|
6
|
+
module Rspec
|
7
|
+
module Setup
|
8
|
+
def self.extended(obj)
|
9
|
+
%w[controller_example].each do |m|
|
10
|
+
obj.send("setup_#{m}")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def setup_controller_example
|
17
|
+
require 'eac_active_scaffold/rspec/shared_contexts/active_scaffold_controller'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
::RSpec.shared_context 'active_scaffold_controller' do |options|
|
4
|
+
let(:index_path) { options.fetch(:index_path) }
|
5
|
+
let(:model) { options.fetch(:model) }
|
6
|
+
|
7
|
+
before do
|
8
|
+
visit index_path
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'show index page' do
|
12
|
+
expect(page).to have_content model.model_name.human(count: 2)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'create new record' do
|
16
|
+
expect do
|
17
|
+
click_on ::I18n.t('active_scaffold.create_new')
|
18
|
+
options.fetch(:valid).each do |key, value|
|
19
|
+
fill_in model.human_attribute_name(key), with: value
|
20
|
+
end
|
21
|
+
click_on ::I18n.t('active_scaffold.create')
|
22
|
+
end.to change { model.count }.by(1)
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_active_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.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:
|
11
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_scaffold
|
@@ -16,42 +16,60 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.6
|
19
|
+
version: '3.6'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.6.17
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.6
|
29
|
+
version: '3.6'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.6.17
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: eac_ruby_utils
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
39
|
+
version: '0.117'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.117.1
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
47
|
- - "~>"
|
39
48
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
49
|
+
version: '0.117'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.117.1
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: eac_rails_gem_support
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
57
|
- - "~>"
|
46
58
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
59
|
+
version: '0.4'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.4.1
|
48
63
|
type: :development
|
49
64
|
prerelease: false
|
50
65
|
version_requirements: !ruby/object:Gem::Requirement
|
51
66
|
requirements:
|
52
67
|
- - "~>"
|
53
68
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
69
|
+
version: '0.4'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.4.1
|
55
73
|
description:
|
56
74
|
email:
|
57
75
|
executables: []
|
@@ -64,6 +82,9 @@ files:
|
|
64
82
|
- lib/eac_active_scaffold/engine.rb
|
65
83
|
- lib/eac_active_scaffold/patches.rb
|
66
84
|
- lib/eac_active_scaffold/patches/action_dispatch.rb
|
85
|
+
- lib/eac_active_scaffold/rspec.rb
|
86
|
+
- lib/eac_active_scaffold/rspec/setup.rb
|
87
|
+
- lib/eac_active_scaffold/rspec/shared_contexts/active_scaffold_controller.rb
|
67
88
|
- lib/eac_active_scaffold/version.rb
|
68
89
|
homepage:
|
69
90
|
licenses: []
|