Class: RSpec::XlsxMatchers::EmptyRow

Inherits:
BaseSheet
  • Object
show all
Defined in:
lib/rspec/xlsx_matchers/empty_row.rb

Overview

have_excel_empty_row

Instance Attribute Summary collapse

Attributes inherited from BaseSheet

#sheet, #sheet_name, #subject

Instance Method Summary collapse

Methods inherited from BaseSheet

#in_sheet, #matches?

Methods included from Utils

#force_array, #map_output

Constructor Details

#initialize(row_index) ⇒ EmptyRow

Returns a new instance of EmptyRow.



9
10
11
12
# File 'lib/rspec/xlsx_matchers/empty_row.rb', line 9

def initialize(row_index)
  super()
  @row_index = row_index
end

Instance Attribute Details

#row_indexObject (readonly)

Returns the value of attribute row_index.



7
8
9
# File 'lib/rspec/xlsx_matchers/empty_row.rb', line 7

def row_index
  @row_index
end

Instance Method Details

#failure_messageObject



20
21
22
23
24
# File 'lib/rspec/xlsx_matchers/empty_row.rb', line 20

def failure_message
  return sheet_failure_message if sheet.nil?

  "Row at index '#{row_index}' was expected to be empty, but was not empty."
end

#failure_message_when_negatedObject



14
15
16
17
18
# File 'lib/rspec/xlsx_matchers/empty_row.rb', line 14

def failure_message_when_negated
  return sheet_failure_message if sheet.nil?

  "Row at index '#{row_index}' was expected to NOT be empty, but was empty."
end