lib/numidium/stage.rb
# Provides a fresh environment every time the test is executed
Provides a fresh environment every time the test is executed
Provides a fresh environment every time the test is executed
def evaluate(play)
			@events = []
			@success = []
			thread = Fiber.new do
				instance_exec(*@args, &play)
			rescue Exception => e
				Fiber.yield(Result.new(e))
			end
			loop do
				res = thread.resume(*@args)
				if res.is_a? Numidium::Result or res.is_a? Numidium::Report
					@events << res
				else
					break
				end
			end
			return @events
		end
def evaluate ( play ) @events = [ ] @success = [ ] thread = Fiber . new do instance_exec ( * @args , & play ) rescue Exception => e Fiber . yield ( Result . new ( e ) ) end loop do res = thread . resume ( * @args ) if res . is_a? Numidium :: Result or res . is_a? Numidium :: Report @events << res else break end end return @events end
Provides a fresh environment every time the test is executed
Provides a fresh environment every time the test is executed
play