Sha256: 8173eb0c587f78639b05f524f81e5b8e9aa9ac16027c574237e3ec8098bab767
Contents?: true
Size: 889 Bytes
Versions: 5
Compression:
Stored size: 889 Bytes
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'pedump' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} RSpec.configure do |config| end def sample @pedump ||= begin fname = if self.example # called from it(...) self.example.full_description.split.first else # called from before(:all) self.class.metadata[:example_group][:description_args].first end fname = File.expand_path(File.dirname(__FILE__) + '/../samples/' + fname) File.open(fname,"rb") do |f| if block_given? yield PEdump.new(f) else PEdump.new(f).dump end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
pedump-0.4.11 | spec/spec_helper.rb |
pedump-0.4.10 | spec/spec_helper.rb |
pedump-0.4.9.2 | spec/spec_helper.rb |
pedump-0.4.9.1 | spec/spec_helper.rb |
pedump-0.4.9 | spec/spec_helper.rb |