Class: Spec::Runner::ExampleGroupRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/rspec-1.1.12/lib/spec/runner/example_group_runner.rb

Direct Known Subclasses

BehaviourRunner

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ExampleGroupRunner

Returns a new instance of ExampleGroupRunner.



4
5
6
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/example_group_runner.rb', line 4

def initialize(options)
  @options = options
end

Instance Method Details

#load_files(files) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/example_group_runner.rb', line 8

def load_files(files)
  # It's important that loading files (or choosing not to) stays the
  # responsibility of the ExampleGroupRunner. Some implementations (like)
  # the one using DRb may choose *not* to load files, but instead tell
  # someone else to do it over the wire.
  $KCODE = 'u' if RUBY_VERSION < '1.9'
  files.each do |file|
    load file
  end
end

#runObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/example_group_runner.rb', line 19

def run
  prepare
  success = true
  example_groups.each do |example_group|
    success = success & example_group.run(@options)
  end
  return success
ensure
  finish
end