Sha256: 97b64a4d17d8e784d5fdebcaedd60e71cf2702e9aaa3ad228ab96e390fc5dd39
Contents?: true
Size: 782 Bytes
Versions: 4
Compression:
Stored size: 782 Bytes
Contents
require File.dirname(File.expand_path(__FILE__)) + '/../lib/shrimple' module Helpers # returns the example HTML that should be passed to phantomjs def example_html File.expand_path('../test_file.html', __FILE__) end # Returns the number of seconds the block took to execute # (is there no built-in way to do this??) # TODO: clean this up def time &block start = Time.now result = block.call finish = Time.now finish - start end end RSpec.configure do |config| config.include Helpers # if a failing test left phantom js processes hanging around, kill them config.after(:each) do Shrimple.processes.kill_all count = Shrimple.processes.count raise "still #{count} prcoess#{count == 1 ? '' : 'es'}??" unless count == 0 end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
shrimple-0.8.6 | spec/spec_helper.rb |
shrimple-0.8.4 | spec/spec_helper.rb |
shrimple-0.8.2 | spec/spec_helper.rb |
shrimple-0.8.0 | spec/spec_helper.rb |