Class: SpecRunner

Inherits:
MSpecScript show all
Defined in:
lib/test/framework_test.rb

Instance Method Summary collapse

Methods inherited from MSpecScript

config, #config, #custom_options, #custom_register, #entries, #files, get, #load, #load_default, main, #register, set, #signals

Constructor Details

#initializeSpecRunner

Returns a new instance of SpecRunner.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/test/framework_test.rb', line 9

def initialize
  super
  config[:files] = []

  # turn on exception backtrace
  #MSpec.backtrace = false

  #Run all the framework specs we can from the spec app
  spec_folder = File.expand_path(File.dirname(__FILE__) + "/../../spec/framework_spec/app/spec")

  config[:files] <<  spec_folder + '/rhoerror_spec.rb'
  config[:files] <<  spec_folder + '/rhoruby_spec.rb'
  config[:files] <<  spec_folder + '/bsearch_spec.rb'
  config[:files] <<  spec_folder + '/find_spec.rb'
  
end

Instance Method Details

#runObject



26
27
28
29
30
31
# File 'lib/test/framework_test.rb', line 26

def run
  MSpec.register_files config[:files]

  MSpec.process
  MSpec.exit_code
end