Module: RTest::MainTest

Defined in:
lib/rtest/main_test.rb

Constant Summary collapse

@@tests =
[]

Instance Method Summary collapse

Instance Method Details

#runObject



14
15
16
17
18
# File 'lib/rtest/main_test.rb', line 14

def run
  files = RTest::FileGetter.files_from_args
  files.each { |file| process_file(file) }
  run_tests
end

#run_testsObject



10
11
12
# File 'lib/rtest/main_test.rb', line 10

def run_tests
  @@tests.each { |test| test.run }
end

#testsObject



20
21
22
# File 'lib/rtest/main_test.rb', line 20

def tests
  @@tests
end

#the(message, optional_message = '', &block) ⇒ Object



6
7
8
# File 'lib/rtest/main_test.rb', line 6

def the(message, optional_message = '', &block)
  @@tests << RTest::NestedTest.new(message, optional_message, &block)
end