Module: Plumbum::RSpec::StubProvider::ClassMethods

Defined in:
lib/plumbum/rspec/stub_provider.rb

Overview

Class methods to extend when including StubProvider.

Instance Method Summary collapse

Instance Method Details

#stub_provider(provider, key, value) ⇒ Symbol

Stubs the value of a specific key for a provider for the current spec.

Parameters:

  • provider (Plumbum::Provider)

    the provider to stub.

  • key (String, Symbol)

    the key to stub.

  • value (Object)

    the temporary value to assign for the key.

Returns:

  • (Symbol)

    the stubbed key.

Raises:



15
16
17
# File 'lib/plumbum/rspec/stub_provider.rb', line 15

def stub_provider(provider, key, value)
  before(:example) { stub_provider(provider, key, value) }
end