class Rambo::RSpec::SpecFile
Constants
- TEMPLATE_PATH
Attributes
examples[R]
options[R]
raml[R]
Public Class Methods
new(raml, options={})
click to toggle source
# File lib/rambo/rspec/spec_file.rb, line 14 def initialize(raml, options={}) @raml = Rambo::RamlModels::Api.new(raml, options) @options = options @examples = Examples.new(@raml, @options) end
Public Instance Methods
render()
click to toggle source
# File lib/rambo/rspec/spec_file.rb, line 24 def render b = binding ERB.new(template, 0, "-", "@result").result(raml.instance_eval { b }) @result end
template()
click to toggle source
# File lib/rambo/rspec/spec_file.rb, line 20 def template @template ||= File.read(TEMPLATE_PATH) end