capybara_table 0.1.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/capybara_table.gemspec +3 -3
- data/lib/capybara_table/rspec.rb +8 -1
- data/lib/capybara_table/version.rb +1 -1
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ed17427e7c299dc626e50cb0b7154d5d55b4a391c1d6361542517f93b2af835a
|
4
|
+
data.tar.gz: ba7bfe46f5b16828cc016c24ce6fa3d951a1f5f39664ee030eee4a0c4cc1163d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 996504cd8669bacfd264a373dde14f9c0a8cd75f5acfd1aac56fb42c8fbf6624158f8f0e47b6ca34c907624cf86f01be0f89f43e8aae1f9c52a261657429a9db
|
7
|
+
data.tar.gz: 5144f19e66f2a3e467ca536e794df6862d75bf89656559c01da139eefdc1fb2d14b139341f3e5c4d5e9b336c1772c05c46b61013714b3f4f06d91e9a55856be6
|
data/README.md
CHANGED
@@ -63,7 +63,7 @@ find(:table, "People") # by caption
|
|
63
63
|
find(:table_row, {"First Name" => "Jonas", "Last Name" => "Nicklas"}, {})
|
64
64
|
|
65
65
|
# Assert on a table row with RSpec
|
66
|
-
expect(find(:table "People")).to have_table_row("First Name" => "Jonas", "Last Name" => "Nicklas")
|
66
|
+
expect(find(:table, "People")).to have_table_row("First Name" => "Jonas", "Last Name" => "Nicklas")
|
67
67
|
|
68
68
|
# Assert on a table row with MiniTest
|
69
69
|
within :table, "People" do
|
data/capybara_table.gemspec
CHANGED
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler", "~>
|
23
|
+
spec.add_development_dependency "bundler", "~> 2.3"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
-
spec.add_dependency "capybara", "
|
27
|
-
spec.add_dependency "xpath", "
|
26
|
+
spec.add_dependency "capybara", ">= 3.31"
|
27
|
+
spec.add_dependency "xpath", ">= 2.1"
|
28
28
|
spec.add_dependency "terminal-table"
|
29
29
|
end
|
data/lib/capybara_table/rspec.rb
CHANGED
@@ -10,7 +10,13 @@ module CapybaraTable
|
|
10
10
|
|
11
11
|
matcher :have_table_row do |fields_and_options|
|
12
12
|
fields, options = fields_and_options.partition { |k, v| k.is_a?(String) }.map(&:to_h)
|
13
|
-
|
13
|
+
|
14
|
+
klass = begin
|
15
|
+
Capybara::RSpecMatchers::Matchers::HaveSelector
|
16
|
+
rescue NameError
|
17
|
+
Capybara::RSpecMatchers::HaveSelector
|
18
|
+
end
|
19
|
+
selector = klass.new(:table_row, fields, **options)
|
14
20
|
|
15
21
|
match do |node|
|
16
22
|
selector.matches?(node)
|
@@ -36,5 +42,6 @@ end
|
|
36
42
|
|
37
43
|
RSpec.configure do |config|
|
38
44
|
config.include CapybaraTable::RSpecMatchers, type: :feature
|
45
|
+
config.include CapybaraTable::RSpecMatchers, type: :system
|
39
46
|
config.include CapybaraTable::RSpecMatchers, type: :view
|
40
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara_table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Nicklas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.3'
|
20
20
|
type: :development
|
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: '
|
26
|
+
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,28 +56,28 @@ dependencies:
|
|
56
56
|
name: capybara
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.31'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.31'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: xpath
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '2.1'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- jonas.nicklas@gmail.com
|
100
100
|
executables: []
|
@@ -119,7 +119,7 @@ homepage: https://www.github.com/jnicklas/capybara_table
|
|
119
119
|
licenses:
|
120
120
|
- MIT
|
121
121
|
metadata: {}
|
122
|
-
post_install_message:
|
122
|
+
post_install_message:
|
123
123
|
rdoc_options: []
|
124
124
|
require_paths:
|
125
125
|
- lib
|
@@ -134,9 +134,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
|
-
|
138
|
-
|
139
|
-
signing_key:
|
137
|
+
rubygems_version: 3.3.7
|
138
|
+
signing_key:
|
140
139
|
specification_version: 4
|
141
140
|
summary: Selectors for working with tables for Capybara
|
142
141
|
test_files: []
|