test/minion_test.rb in parallel_minion-0.1.0 vs test/minion_test.rb in parallel_minion-0.2.0
- old
+ new
@@ -99,9 +99,31 @@
# Only Parallel Minions time-out when they exceed the timeout
if enabled
assert_equal nil, minion.result
end
end
+
+ should 'make description instance variable available' do
+ minion = ParallelMinion::Minion.new(description: 'Test') do
+ description
+ end
+ assert_equal 'Test', minion.result
+ end
+
+ should 'make timeout instance variable available' do
+ minion = ParallelMinion::Minion.new(description: 'Test', timeout: 1000 ) do
+ timeout
+ end
+ assert_equal 1000, minion.result
+ end
+
+ should 'make enabled? method available' do
+ minion = ParallelMinion::Minion.new(description: 'Test') do
+ enabled?
+ end
+ assert_equal enabled, minion.result
+ end
+
end
end
end
\ No newline at end of file