Sha256: 66b71f3f8514d9e89e21e16db909974337fe07de0fbda493c2aff7849c1c27d0
Contents?: true
Size: 815 Bytes
Versions: 88
Compression:
Stored size: 815 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
88 entries across 88 versions & 1 rubygems