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

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

Methods

Attributes

hidden  [W]  @api private
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 mutated 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

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

  this constant.
inspect()

Alias for to_s

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

  (stubbed or hidden) this constant.

@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]