Class: SystemTester::Stair

Inherits:
Step show all
Includes:
Fileable, TitleValidatable
Defined in:
app/models/system_tester/stair.rb

Constant Summary

Constants inherited from Step

SystemTester::Step::INDENT

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Step

args, #bg_css, #commented_title, #friendly_type, friendly_type, leafs, parent_type, #parent_type, parent_types, #text_css, text_css

Class Method Details

.bg_cssObject



38
39
40
# File 'app/models/system_tester/stair.rb', line 38

def self.bg_css
  "deep-purple"
end

Instance Method Details

#iconObject



34
35
36
# File 'app/models/system_tester/stair.rb', line 34

def icon
  "clear_all"
end

#method_nameObject



30
31
32
# File 'app/models/system_tester/stair.rb', line 30

def method_name
  stripped_title.underscore
end

#moduleObject Also known as: code_to_write



17
18
19
20
21
22
23
# File 'app/models/system_tester/stair.rb', line 17

def module
  str = ""
  str << open
  str << steps.map(&:to_s).join("")
  str << close
  str
end

#module_nameObject



26
27
28
# File 'app/models/system_tester/stair.rb', line 26

def module_name
  stripped_title.camelize
end

#to_sObject



13
14
15
# File 'app/models/system_tester/stair.rb', line 13

def to_s
  "#{INDENT}# Stair: #{title}\n#{INDENT}#{method_name}\n\n"
end