Module: RailsTestServing::Client

Extended by:
Client
Included in:
Client
Defined in:
lib/rails_test_serving/client.rb

Constant Summary collapse

@@disabled =

Setting this variable to true inhibits #run_tests.

false

Instance Method Summary collapse

Instance Method Details

#disableObject



8
9
10
11
12
13
# File 'lib/rails_test_serving/client.rb', line 8

def disable
  @@disabled = true
  yield
ensure
  @@disabled = false
end

#run_testsObject



23
24
25
26
# File 'lib/rails_test_serving/client.rb', line 23

def run_tests
  return if @@disabled
  run_tests!
end

#tests_on_exitObject



15
16
17
# File 'lib/rails_test_serving/client.rb', line 15

def tests_on_exit
  !Test::Unit.run?
end

#tests_on_exit=(yes) ⇒ Object



19
20
21
# File 'lib/rails_test_serving/client.rb', line 19

def tests_on_exit=(yes)
  Test::Unit.run = !yes
end