Sha256: 5707c397f2117dcd99b964f7436a551bfa1536a0626ea90d59c68007b7888128
Contents?: true
Size: 983 Bytes
Versions: 3
Compression:
Stored size: 983 Bytes
Contents
if ENV['COVERAGE'] raise "simplecov only works on 1.9" unless RUBY_PLATFORM >= "1.9" require 'simplecov' SimpleCov.start { add_filter "spec/" } end $LOAD_PATH.unshift File.expand_path("../lib", __FILE__) require "har" module HAR module SpecHelper def fixture_path(name) File.join(File.expand_path("../fixtures", __FILE__), name) end def har_path(name) fixture_path File.join("hars", "#{name}.har") end def json(path) JSON.parse(File.read(path)) end def all_hars Dir[fixture_path("hars/*.har")] end def google_path har_path "google.com" end def good_hars all_hars.reject { |e| e =~ /bad/ } end def with_stdin_replaced_by(file_path) stdin = $stdin begin File.open(file_path, "r") { |io| $stdin = io yield } ensure $stdin = stdin end end end end RSpec.configure do |c| c.include HAR::SpecHelper end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
har-0.0.8 | spec/spec_helper.rb |
har-0.0.7 | spec/spec_helper.rb |
har-0.0.6 | spec/spec_helper.rb |