Class: TestRunner

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(requests) ⇒ TestRunner

Returns a new instance of TestRunner.



339
340
341
# File 'lib/rest_test.rb', line 339

def initialize requests
  @context = TestContext.new requests
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



337
338
339
# File 'lib/rest_test.rb', line 337

def context
  @context
end

Instance Method Details

#run(testfile) ⇒ Object



343
344
345
346
347
348
349
# File 'lib/rest_test.rb', line 343

def run testfile
  File.open testfile do |file|
    eval( file.read, @context.get_binding )
  end

  @context.print_summary
end