Class RSpec::Mocks::Constant
In: lib/rspec/mocks/stub_const.rb
Parent: Object

Provides information about constants that may (or may not) have been stubbed by rspec-mocks.

Methods

Attributes

name  [R]  @return [String] The fully qualified name of the constant.
original_value  [RW]  @return [Object, nil] The original value (e.g. before it
  was stubbed by rspec-mocks) of the constant, or
  nil if the constant was not previously defined.
previously_defined  [W]  @api private
stubbed  [W]  @api private

Public Class methods

@api private

Queries rspec-mocks to find out information about the named constant.

@param [String] name the name of the constant @return [Constant] an object contaning information about the named

  constant.

Public Instance methods

inspect()

Alias for to_s

@return [Boolean] Whether or not the constant was defined

  before the current example.

@return [Boolean] Whether or not rspec-mocks has stubbed

  this constant.

[Validate]