Sha256: 8cdb3745623be5ec31c34d655943dcf7be5c11789c73a67d847939bdeadf1678

Contents?: true

Size: 803 Bytes

Versions: 5

Compression:

Stored size: 803 Bytes

Contents

#
# Testing Rufus
#
# John Mettraux at openwfe.org
#
# Fri Apr 18 11:29:18 JST 2008
#

require 'test/unit'
require 'openwfe/util/scheduler'


#
# testing otime and the scheduler
#

class SchedulerNameTest < Test::Unit::TestCase

  #def setup
  #end

  #def teardown
  #end

  def test_0

    scheduler = Rufus::Scheduler.new
    scheduler.start

    sleep 0.350 if defined?(JRUBY_VERSION)

    t = scheduler.instance_variable_get(:@scheduler_thread)

    assert_equal "rufus scheduler", t[:name]

    scheduler.stop
  end

  def test_1

    scheduler = Rufus::Scheduler.new :thread_name => "genjiguruma"
    scheduler.start

    sleep 0.350 if defined?(JRUBY_VERSION)

    t = scheduler.instance_variable_get(:@scheduler_thread)

    assert_equal "genjiguruma", t[:name]

    scheduler.stop
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rufus-scheduler-1.0.10 test/scheduler_name_test.rb
rufus-scheduler-1.0.8 test/scheduler_name_test.rb
rufus-scheduler-1.0.7 test/scheduler_name_test.rb
rufus-scheduler-1.0.9 test/scheduler_name_test.rb
rufus-scheduler-1.0.11 test/scheduler_name_test.rb