Class: Fat::Table

Inherits:
Fit::Fixture show all
Defined in:
lib/fat/table.rb

Constant Summary collapse

@@table =
nil

Constants inherited from Fit::Fixture

Fit::Fixture::GRAY, Fit::Fixture::GREEN, Fit::Fixture::RED, Fit::Fixture::YELLOW

Instance Attribute Summary

Attributes inherited from Fit::Fixture

#args, #counts, #listener, #summary

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Fit::Fixture

camel, #check, #do_cell, #do_cells, #do_row, #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

Class Method Details

.copy(tree) ⇒ Object



18
19
20
# File 'lib/fat/table.rb', line 18

def Table.copy tree
  tree.nil? ? nil : Fit::ParseHolder.create(tree.tag, tree.body, Table.copy(tree.parts), Table.copy(tree.more))
end

.tableObject



11
# File 'lib/fat/table.rb', line 11

def Table.table; @@table; end

.table=(table) ⇒ Object



12
# File 'lib/fat/table.rb', line 12

def Table.table= table; @@table = table; end

Instance Method Details

#do_rows(rows) ⇒ Object



13
14
15
16
17
# File 'lib/fat/table.rb', line 13

def do_rows rows
  @@table = Fit::ParseHolder.create('table', nil, Table.copy(rows), nil)
  # evaluate the rest of the table like a runner
  Fit::Fixture.new.do_tables @@table
end