Module: RSpec::XlsxMatchers
- Defined in:
- lib/rspec/xlsx_matchers.rb,
lib/rspec/xlsx_matchers/cells.rb,
lib/rspec/xlsx_matchers/utils.rb,
lib/rspec/xlsx_matchers/in_row.rb,
lib/rspec/xlsx_matchers/sheets.rb,
lib/rspec/xlsx_matchers/columns.rb,
lib/rspec/xlsx_matchers/version.rb,
lib/rspec/xlsx_matchers/empty_row.rb,
lib/rspec/xlsx_matchers/in_column.rb,
lib/rspec/xlsx_matchers/base_sheet.rb,
lib/rspec/xlsx_matchers/cell_value.rb,
lib/rspec/xlsx_matchers/exact_match.rb,
lib/rspec/xlsx_matchers/filled_rows.rb
Overview
# RSpec::XlsxMatchers adds the following matchers to rspec
- have_excel_sheets
- have_excel_columns
- have_excel_column
- have_excel_empty_row
- have_excel_cells
- have_excel_cell_value
- have_excel_filled_rows
Defined Under Namespace
Modules: ExactMatch, InColumn, InRow, Utils
Classes: BaseSheet, CellValue, Cells, Columns, EmptyRow, FilledRows, Sheets
Constant Summary
collapse
- VERSION =
"0.1.6"
Instance Method Summary
collapse
Instance Method Details
#have_excel_cell_value(value) ⇒ Object
62
63
64
|
# File 'lib/rspec/xlsx_matchers.rb', line 62
def have_excel_cell_value(value)
CellValue.new(value)
end
|
#have_excel_cells(cells) ⇒ Object
58
59
60
|
# File 'lib/rspec/xlsx_matchers.rb', line 58
def have_excel_cells(cells)
Cells.new(cells)
end
|
#have_excel_column(column_name) ⇒ Object
48
49
50
51
52
|
# File 'lib/rspec/xlsx_matchers.rb', line 48
def have_excel_column(column_name)
raise ArgumentError, "Column name should not be an Array" if column_name.is_a?(Array)
Columns.new([column_name])
end
|
#have_excel_columns(column_names) ⇒ Object
44
45
46
|
# File 'lib/rspec/xlsx_matchers.rb', line 44
def have_excel_columns(column_names)
Columns.new(column_names)
end
|
#have_excel_empty_row(index) ⇒ Object
54
55
56
|
# File 'lib/rspec/xlsx_matchers.rb', line 54
def have_excel_empty_row(index)
EmptyRow.new(index)
end
|
#have_excel_filled_rows(count) ⇒ Object
66
67
68
|
# File 'lib/rspec/xlsx_matchers.rb', line 66
def have_excel_filled_rows(count)
FilledRows.new(count)
end
|
#have_excel_sheets(sheet_names) ⇒ Object
class Error < StandardError; end
40
41
42
|
# File 'lib/rspec/xlsx_matchers.rb', line 40
def have_excel_sheets(sheet_names)
Sheets.new(sheet_names)
end
|