test/minion_test.rb in parallel_minion-0.0.1 vs test/minion_test.rb in parallel_minion-0.1.0
- old
+ new
@@ -14,14 +14,14 @@
class MinionTest < Test::Unit::TestCase
include SemanticLogger::Loggable
context ParallelMinion::Minion do
- [false, true].each do |synchronous|
- context ".new with synchronous: #{synchronous.inspect}" do
+ [false, true].each do |enabled|
+ context ".new with enabled: #{enabled.inspect}" do
setup do
- ParallelMinion::Minion.synchronous = synchronous
+ ParallelMinion::Minion.enabled = enabled
end
should 'without parameters' do
minion = ParallelMinion::Minion.new { 196 }
assert_equal 196, minion.result
@@ -94,11 +94,11 @@
end
end
should 'timeout' do
minion = ParallelMinion::Minion.new(description: 'Test', timeout: 100) { sleep 1 }
- # Only Parallel Minions time-out when they exceed timeout
- unless synchronous
+ # Only Parallel Minions time-out when they exceed the timeout
+ if enabled
assert_equal nil, minion.result
end
end
end
\ No newline at end of file