Module: Jasmine::Config::SeleniumServerForkHackForRSpec

Defined in:
lib/jasmine/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

without this, Selenium’s forked process will attempt to run specs a second time at exit; see www.ruby-forum.com/topic/212722



173
174
175
176
# File 'lib/jasmine/config.rb', line 173

def self.included(base)
  alias_method :fork_without_fix_for_rspec, :fork
  alias_method :fork, :fork_with_fix_for_rspec
end

Instance Method Details

#fork_with_fix_for_rspecObject



178
179
180
181
182
183
# File 'lib/jasmine/config.rb', line 178

def fork_with_fix_for_rspec
  fork_without_fix_for_rspec do
    yield
    at_exit { exit! }
  end
end