rao-shoulda_matchers 0.0.49.pre → 0.0.50.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rao/shoulda/matchers/implement_create_action_matcher.rb +6 -3
- data/lib/rao/shoulda/matchers/implement_delete_action_matcher.rb +2 -2
- data/lib/rao/shoulda/matchers/implement_index_action_matcher.rb +1 -2
- data/lib/rao/shoulda/matchers/implement_show_action_matcher.rb +1 -2
- data/lib/rao/shoulda/matchers/implement_update_action_matcher.rb +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9c8cac562aeb675070d8bf7a2f277a2e2b17886bb4984b188d93c12aeacd643
|
4
|
+
data.tar.gz: 504116728bbddfc6bf2cd770e7977ad3c1d20a2485751649c1fbe4725db021ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e0d2863b2a733d28f0f207aef8de674aa797662a8770fbd7eda4a0849c98bc345ebba19070f85e18dd1754ff9caddd014faea01027e5c951685b3dc4359dc8a
|
7
|
+
data.tar.gz: 1ff1ef0048b8d8f893e35bfe0dc3bdb3ca3884868e5450a1e85b15e10fd7d27a1f0ae6a96d2541bbb33c3231a0a59869ef26c2257dbf64ddfd422cdde7461d5d
|
@@ -86,8 +86,7 @@ module Rao
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def matches?(base_path)
|
89
|
-
@base_path = @spec.class.name.split('::')[0..2].join('::').constantize.description
|
90
|
-
# @base_path = base_path
|
89
|
+
@base_path = @spec.respond_to?(:base_path) ? @spec.base_path : @spec.class.name.split('::')[0..2].join('::').constantize.description
|
91
90
|
@new_path = "#{@base_path}/new"
|
92
91
|
|
93
92
|
@spec.visit(@new_path)
|
@@ -95,7 +94,7 @@ module Rao
|
|
95
94
|
@before_count = @block.call(@resource_class)
|
96
95
|
@spec.within(@form_id) do
|
97
96
|
@form_block.call
|
98
|
-
|
97
|
+
submit_button.click
|
99
98
|
end
|
100
99
|
@after_count = @block.call(@resource_class)
|
101
100
|
|
@@ -155,6 +154,10 @@ module Rao
|
|
155
154
|
def description
|
156
155
|
"expose create action on #{@new_path}"
|
157
156
|
end
|
157
|
+
|
158
|
+
def submit_button
|
159
|
+
@spec.find('input[name="commit"]')
|
160
|
+
end
|
158
161
|
end
|
159
162
|
end
|
160
163
|
end
|
@@ -46,9 +46,9 @@ module Rao
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def matches?(base_path)
|
49
|
-
@base_path = @spec.class.name.split('::')[0..2].join('::').constantize.description
|
50
|
-
# @base_path = base_path
|
49
|
+
@base_path = @spec.respond_to?(:base_path) ? @spec.base_path : @spec.class.name.split('::')[0..2].join('::').constantize.description
|
51
50
|
@expected_path = @base_path
|
51
|
+
|
52
52
|
@show_path = "#{@base_path}/#{id}"
|
53
53
|
|
54
54
|
@spec.visit(@show_path)
|
@@ -21,8 +21,7 @@ module Rao
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def matches?(base_path)
|
24
|
-
@base_path = @spec.class.name.split('::')[0..2].join('::').constantize.description
|
25
|
-
# @base_path = base_path
|
24
|
+
@base_path = @spec.respond_to?(:base_path) ? @spec.base_path : @spec.class.name.split('::')[0..2].join('::').constantize.description
|
26
25
|
|
27
26
|
@spec.visit(@base_path)
|
28
27
|
has_correct_status_code && has_correct_current_path
|
@@ -31,8 +31,7 @@ module Rao
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def matches?(base_path)
|
34
|
-
@base_path = @spec.class.name.split('::')[0..2].join('::').constantize.description
|
35
|
-
# @base_path = base_path
|
34
|
+
@base_path = @spec.respond_to?(:base_path) ? @spec.base_path : @spec.class.name.split('::')[0..2].join('::').constantize.description
|
36
35
|
@expected_path = "#{@base_path}/#{id}"
|
37
36
|
|
38
37
|
@spec.visit(@expected_path)
|
@@ -79,8 +79,8 @@ module Rao
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def matches?(base_path)
|
82
|
-
@base_path = @spec.class.name.split('::')[0..2].join('::').constantize.description
|
83
|
-
|
82
|
+
@base_path = @spec.respond_to?(:base_path) ? @spec.base_path : @spec.class.name.split('::')[0..2].join('::').constantize.description
|
83
|
+
|
84
84
|
@show_path = "#{@base_path}/#{id}"
|
85
85
|
@edit_path = "#{@base_path}/#{id}/edit"
|
86
86
|
|
@@ -92,7 +92,7 @@ module Rao
|
|
92
92
|
|
93
93
|
@spec.within(@form_id) do
|
94
94
|
@form_block.call
|
95
|
-
|
95
|
+
submit_button.click
|
96
96
|
end
|
97
97
|
|
98
98
|
@resource.reload
|
@@ -182,6 +182,10 @@ module Rao
|
|
182
182
|
def description
|
183
183
|
"expose update action on #{@edit_path}"
|
184
184
|
end
|
185
|
+
|
186
|
+
def submit_button
|
187
|
+
@spec.find('input[name="commit"]')
|
188
|
+
end
|
185
189
|
end
|
186
190
|
end
|
187
191
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-shoulda_matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.50.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rao
|
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
316
316
|
- !ruby/object:Gem::Version
|
317
317
|
version: 1.3.1
|
318
318
|
requirements: []
|
319
|
-
rubygems_version: 3.4.
|
319
|
+
rubygems_version: 3.4.20
|
320
320
|
signing_key:
|
321
321
|
specification_version: 4
|
322
322
|
summary: Additional shoulda matchers for Ruby on Rails.
|