Class: Fit::ColumnFixture
Direct Known Subclasses
Eg::AllFiles::Expand, Eg::ArithmeticColumnFixture, Eg::BinaryChop, Eg::Book::CalculateDiscount, Eg::Book::CalculateDiscountMoney, Eg::Book::Rent::CalculateLateHours, Eg::Calculator, Eg::Division, Eg::ExampleTests, Eg::Nested::Bob, Eg::Sqrt, Fat::AnnotationFixture, Fat::CommandLineFixture, Fat::Divide, Fat::DocumentParseFixture, Fat::FixtureNameFixture, Fat::HtmlToTextFixture, Fat::OutputFixture, Fat::ParseFixture, Fat::ReferenceFixture, Fat::StandardAnnotationFixture, Fat::TableParseFixture, Fat::TextToHtmlFixture, RowFixture, Fitlibrary::Specify::ColumnFixtureUnderTest, Fitlibrary::Specify::ColumnFixtureUnderTestWithArgs
Constant Summary
Constants inherited from Fixture
Fixture::GRAY, Fixture::GREEN, Fixture::RED, Fixture::YELLOW
Instance Attribute Summary
Attributes inherited from Fixture
#args, #counts, #listener, #summary
Instance Method Summary collapse
- #check(cell, adapter) ⇒ Object
- #do_cell(cell, column_index) ⇒ Object
- #do_row(row) ⇒ Object
-
#do_rows(rows) ⇒ Object
Traversal.
- #execute ⇒ Object
- #reset ⇒ Object
Methods inherited from Fixture
camel, #do_cells, #do_table, #do_tables, #error, escape, #exception, #find_class, #fixture_name, #get_args_for_table, #get_linked_fixture_with_args, gray, #ignore, #info, #initialize, #interpret_following_tables, #interpret_tables, label, metadata, #parse, #right, #total_errors, #totals, #wrong
Constructor Details
This class inherits a constructor from Fit::Fixture
Instance Method Details
#check(cell, adapter) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/fit/column_fixture.rb', line 50 def check cell, adapter unless @has_executed begin execute rescue Exception => e exception cell, e end @has_executed = true end super end |
#do_cell(cell, column_index) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fit/column_fixture.rb', line 32 def do_cell cell, column_index adapter = @column_bindings[column_index] begin text = cell.text if text.empty? check cell, adapter elsif adapter.nil? ignore cell elsif adapter.is_output? check cell, adapter else adapter.set(adapter.parse(text)) end rescue Exception => e exception cell, e end end |
#do_row(row) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fit/column_fixture.rb', line 21 def do_row row @has_executed = false begin reset super execute if not @has_executed rescue Exception => e exception row.leaf, e end end |
#do_rows(rows) ⇒ Object
Traversal
16 17 18 19 |
# File 'lib/fit/column_fixture.rb', line 16 def do_rows rows bind rows.parts super(rows.more) end |
#execute ⇒ Object
66 67 68 |
# File 'lib/fit/column_fixture.rb', line 66 def execute # about to process first method call of row end |
#reset ⇒ Object
62 63 64 |
# File 'lib/fit/column_fixture.rb', line 62 def reset # about to process first cell of row end |