Class: StonesSpec::Subject::Function

Inherits:
Callable
  • Object
show all
Defined in:
lib/subject.rb

Instance Method Summary collapse

Methods inherited from Callable

#call_string, #default_expectations, #default_title, #initialize

Constructor Details

This class inherits a constructor from StonesSpec::Subject::Callable

Instance Method Details

#ast_regexpObject



75
76
77
# File 'lib/subject.rb', line 75

def ast_regexp
  /AST\(function\s*#{@name}/
end

#test_program(source, arguments) ⇒ Object



67
68
69
70
71
72
73
# File 'lib/subject.rb', line 67

def test_program(source, arguments)
  "program {
    return (#{call_string arguments})
  }

  #{source}"
end