Class: RSpec::XlsxMatchers::Columns
- Includes:
- ExactMatch
- Defined in:
- lib/rspec/xlsx_matchers/columns.rb
Overview
have_excel_columns / have_excel_column
Instance Attribute Summary collapse
-
#actual_columns ⇒ Object
readonly
Returns the value of attribute actual_columns.
-
#expected_columns ⇒ Object
readonly
Returns the value of attribute expected_columns.
-
#extra_columns ⇒ Object
readonly
Returns the value of attribute extra_columns.
-
#missing_columns ⇒ Object
readonly
Returns the value of attribute missing_columns.
Attributes included from ExactMatch
Attributes inherited from BaseSheet
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(expected_columns) ⇒ Columns
constructor
A new instance of Columns.
Methods included from ExactMatch
Methods inherited from BaseSheet
Methods included from Utils
Constructor Details
#initialize(expected_columns) ⇒ Columns
Returns a new instance of Columns.
10 11 12 13 14 15 16 |
# File 'lib/rspec/xlsx_matchers/columns.rb', line 10 def initialize(expected_columns) super() @expected_columns = force_array(expected_columns) @missing_columns = [] @extra_columns = [] @actual_columns = [] end |
Instance Attribute Details
#actual_columns ⇒ Object (readonly)
Returns the value of attribute actual_columns.
8 9 10 |
# File 'lib/rspec/xlsx_matchers/columns.rb', line 8 def actual_columns @actual_columns end |
#expected_columns ⇒ Object (readonly)
Returns the value of attribute expected_columns.
8 9 10 |
# File 'lib/rspec/xlsx_matchers/columns.rb', line 8 def expected_columns @expected_columns end |
#extra_columns ⇒ Object (readonly)
Returns the value of attribute extra_columns.
8 9 10 |
# File 'lib/rspec/xlsx_matchers/columns.rb', line 8 def extra_columns @extra_columns end |
#missing_columns ⇒ Object (readonly)
Returns the value of attribute missing_columns.
8 9 10 |
# File 'lib/rspec/xlsx_matchers/columns.rb', line 8 def missing_columns @missing_columns end |
Instance Method Details
#failure_message ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rspec/xlsx_matchers/columns.rb', line 18 def return if sheet.nil? msg = ("Columns mismatch") "#{msg}:\n\t#{}" end |