Sha256: 0704f0e4ad357f6b8e13946842eadbd52741f5e683319df3c09301d5661157bd
Contents?: true
Size: 581 Bytes
Versions: 20
Compression:
Stored size: 581 Bytes
Contents
require "fauxhai" require "omnibus/ohai" module Omnibus module RSpec module OhaiHelpers # # Stub Ohai with the given data. # def stub_ohai(options = {}, &block) ohai = Mash.from_hash(Fauxhai.mock(options, &block).data) allow(Ohai).to receive(:ohai).and_return(ohai) # If we asked for Windows, we should also specify that magical # +File::ALT_SEPARATOR+ variable if options[:platform] && options[:platform] == "windows" stub_const("File::ALT_SEPARATOR", '\\') end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems