rspec-xlsx_matchers 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 473cdf47e72962c4cd486d4a4dc90e4c3e06213af0f4a6b418e5324cbe8b0ee6
4
- data.tar.gz: e5898fce3654266b287ac4a28e07f3c0c7ae041b327912db3da98c6f950b5be1
3
+ metadata.gz: a1465d990a256a7f4407284c21bf2f656a369d5008d7c2b9c2df053be9f07d01
4
+ data.tar.gz: a46a178d9225158efb189a3387d2941b60afee46dc84a45ae3616aa70f11e36f
5
5
  SHA512:
6
- metadata.gz: 615ce26d5cfc4f2384aadae5c0818b7578ed33bfa470d9749f54fb1eb083083c01d74da78b283b8ff8b69512ef6627e512732ce3c1daa4d26a4f3e0a6070835f
7
- data.tar.gz: 55d710b4a612c63e413e55089aeaf095e94f706479608c718b9009955ff31afda351161417ec2ce188abb3003ab09aa55b966082bbc5fdfc699c58400c461b6e
6
+ metadata.gz: c7ce34db6bac2e363f5a297ad303ba444187108a1e1bda7da2bcc2c69bc89342e955387fff18a611ac2799eac59a2a23282444629894761e50b2f1be8402f716
7
+ data.tar.gz: 842250df331a05307531e830445c4d88422e900235a8f5dffb48cbccab42e4c4764622fea5ef25c5902d1810e8b787cce84c22146060fce6039b1a4966e3c422
@@ -19,10 +19,18 @@ module RSpec
19
19
  return row_not_found_message if row_not_found?
20
20
  return column_not_found_message if column_not_found?
21
21
 
22
- "Mismatch cell value in column '#{column_name}' of row '#{row_index}': " \
22
+ "Mismatch cell value in column #{failure_message_in_column} of row '#{row_index}': " \
23
23
  "expected: '#{expected_value}', received: '#{actual_value}'"
24
24
  end
25
25
 
26
+ def failure_message_in_column
27
+ if column_name.nil?
28
+ "column with index #{column_index}"
29
+ else
30
+ "column '#{column_name}'"
31
+ end
32
+ end
33
+
26
34
  private
27
35
 
28
36
  def process_axlsx_sheet
@@ -31,7 +31,7 @@ module RSpec
31
31
  end
32
32
 
33
33
  def process_roo_sheet
34
- row = sheet.row(row_index).compact
34
+ row = sheet.row(row_index + 1).compact
35
35
  true if row.empty?
36
36
  end
37
37
  end
@@ -11,6 +11,11 @@ module RSpec
11
11
  self
12
12
  end
13
13
 
14
+ def in_column_by_index(index)
15
+ @column_index = index
16
+ self
17
+ end
18
+
14
19
  private
15
20
 
16
21
  def column_index
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module XlsxMatchers
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-xlsx_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - drvn-eb
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-04 00:00:00.000000000 Z
11
+ date: 2024-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec