test/event_test.rb in clockwork-1.2.0 vs test/event_test.rb in clockwork-1.2.1

- old
+ new

@@ -1,35 +1,35 @@ require File.expand_path('../../lib/clockwork', __FILE__) -require 'active_support/test_case' +require "minitest/autorun" -class EventTest < ActiveSupport::TestCase - describe "#thread?" do - setup do - @manager = mock +describe Clockwork::Event do + describe '#thread?' do + before do + @manager = Class.new end - describe "manager config thread option set to true" do - setup do + describe 'manager config thread option set to true' do + before do @manager.stubs(:config).returns({ :thread => true }) end - test "is true" do + it 'is true' do event = Clockwork::Event.new(@manager, nil, nil, nil) assert_equal true, event.thread? end - test "is false when event thread option set" do + it 'is false when event thread option set' do event = Clockwork::Event.new(@manager, nil, nil, nil, :thread => false) assert_equal false, event.thread? end end - describe "manager config thread option not set" do - setup do + describe 'manager config thread option not set' do + before do @manager.stubs(:config).returns({}) end - test "is true if event thread option is true" do + it 'is true if event thread option is true' do event = Clockwork::Event.new(@manager, nil, nil, nil, :thread => true) assert_equal true, event.thread? end end end