Class: RailsEdgeTest::Printers::Tree

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_edge_test/printers/tree.rb

Instance Method Summary collapse

Constructor Details

#initializeTree

Returns a new instance of Tree.



3
4
5
# File 'lib/rails_edge_test/printers/tree.rb', line 3

def initialize
  @count = 0
end

Instance Method Details

#begin_action(action) ⇒ Object



26
27
28
# File 'lib/rails_edge_test/printers/tree.rb', line 26

def begin_action(action)
  puts "  #{action.name}"
end

#begin_controller(controller) ⇒ Object



18
19
20
# File 'lib/rails_edge_test/printers/tree.rb', line 18

def begin_controller(controller)
  puts controller.controller_class.name
end

#begin_edge(edge) ⇒ Object



33
34
35
# File 'lib/rails_edge_test/printers/tree.rb', line 33

def begin_edge(edge)
  print "    #{edge.description}"
end

#begin_suiteObject



7
8
9
10
11
12
# File 'lib/rails_edge_test/printers/tree.rb', line 7

def begin_suite
  puts ""
  puts "Generating Edges..."
  puts "-------------------"
  puts ""
end

#end_actionObject



30
31
# File 'lib/rails_edge_test/printers/tree.rb', line 30

def end_action
end

#end_controllerObject



22
23
24
# File 'lib/rails_edge_test/printers/tree.rb', line 22

def end_controller
  puts ""
end

#end_edgeObject



37
38
39
40
# File 'lib/rails_edge_test/printers/tree.rb', line 37

def end_edge
  puts " ... done"
  @count += 1
end

#end_suiteObject



14
15
16
# File 'lib/rails_edge_test/printers/tree.rb', line 14

def end_suite
  puts "\n#{@count} edge specs executed."
end