/vendor/daemon_kit/lib/daemon_kit/cucumber/world.rb
Ruby | 38 lines | 24 code | 7 blank | 7 comment | 1 complexity | 6488b5036be20295896a9cd6a3f4565f MD5 | raw file
1# -*- coding: utf-8 -*- 2# Based on code from Brian Takita, Yurii Rashkovskii, Ben Mabey and Aslak Hellesøy 3# Adapted by Kenneth Kalmer for daemon-kit 4 5begin 6 require 'test/unit/testresult' 7rescue LoadError => e 8 e.message << "\nYou must gem install test-unit. For more info see https://rspec.lighthouseapp.com/projects/16211/tickets/292" 9 raise e 10end 11 12# So that Test::Unit doesn't launch at the end - makes it think it has already been run. 13Test::Unit.run = true if Test::Unit.respond_to?(:run=) 14 15$__cucumber_toplevel = self 16 17module DaemonKit 18 module Cucumber 19 # All scenarios will execute in the context of a new instance of World. 20 class World 21 def initialize #:nodoc: 22 @_result = Test::Unit::TestResult.new 23 end 24 end 25 26 $__cucumber_toplevel.Before do 27 # Placeholder 28 end 29 30 $__cucumber_toplevel.After do 31 # Placeholder 32 end 33 end 34end 35 36World do 37 DaemonKit::Cucumber::World.new 38end