Sha256: 2f8967bfc6a308247f592552cec4f8a7c47dfd39db251482f6c4eaf58b3125f8
Contents?: true
Size: 816 Bytes
Versions: 47
Compression:
Stored size: 816 Bytes
Contents
# frozen_string_literal: true module Alchemy module TestSupport # Allows you to stub the Alchemy configuration in your specs # # Require and include this file in your RSpec config. # # RSpec.configure do |config| # config.include Alchemy::TestSupport::ConfigStubbing # end # module ConfigStubbing # Stub a key from the Alchemy config # # @param key [Symbol] The configuration key you want to stub # @param value [Object] The value you want to return instead of the original one # def stub_alchemy_config(key, value) allow(Alchemy::Config).to receive(:get) do |arg| if arg == key value else Alchemy::Config.show[arg.to_s] end end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems