Class: SystemTester::Scenario

Inherits:
ApplicationRecord show all
Includes:
TitleValidatable
Defined in:
app/models/system_tester/scenario.rb

Constant Summary collapse

INDENT =
" " * 4

Instance Method Summary collapse

Instance Method Details

#line_numberObject



27
28
29
30
# File 'app/models/system_tester/scenario.rb', line 27

def line_number
  lines = feature.to_s.split("\n")
  lines.index { |line| open.chomp === line } + 1
end

#to_sObject



19
20
21
22
23
24
25
# File 'app/models/system_tester/scenario.rb', line 19

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