Sha256: 8544f0652b8ac0a6ec54ab4a4637ef8b84a8ec8855bb260f9e8378282ecce5db
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
require 'eventmachine' require 'em-fs' SPEC_ROOT = File.expand_path(File.dirname(__FILE__)) EventMachine.instance_eval do def assertions time = 1 EM.add_timer(time) do EM.stop_event_loop yield end end end unless EM.respond_to?(:assertions) system("cd #{SPEC_ROOT}/data; mkdir -p a b/a b/b c/a/{a,b}") system("cd #{SPEC_ROOT}/data; touch {a,b}/x b/a/{x,y,z}") unless File.exists?(File.join(SPEC_ROOT, 'data', 'test')) and File.exists?(File.join(SPEC_ROOT, 'data', 'test2')) and File.exists?(File.join(SPEC_ROOT, 'data', 'test3')) puts "Creating test dummy data" system "mkdir -p #{File.join(SPEC_ROOT, 'data')}" system "dd if=/dev/urandom of=#{File.join(SPEC_ROOT, 'data', 'test')} bs=1024 count=100" system "dd if=/dev/urandom of=#{File.join(SPEC_ROOT, 'data', 'test2')} bs=1024 count=100" system "dd if=/dev/urandom of=#{File.join(SPEC_ROOT, 'data', 'test3')} bs=1024 count=100" end # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config.filter_run :focus end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-fs-0.1.2 | spec/spec_helper.rb |
em-fs-0.1.1 | spec/spec_helper.rb |