Module: Spectroscope

Defined in:
lib/spectroscope.rb,
lib/spectroscope/hooks.rb,
lib/spectroscope/world.rb,
lib/spectroscope/context.rb,
lib/spectroscope/example.rb

Defined Under Namespace

Modules: DSL Classes: Context, Example, Hooks, World

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object

If constant is missing, check for it in project metadata.



62
63
64
# File 'lib/spectroscope.rb', line 62

def self.const_missing(name)
  [name.to_s.downcase] || super(name)
end

.metadataHash

Access to project metadata.

Returns:

  • (Hash)

    metadata



52
53
54
55
56
57
# File 'lib/spectroscope.rb', line 52

def self.
  @metadata ||= (
    require 'yaml'
    YAML.load_file(File.dirname(__FILE__), '/spectrascope.yml')
  )
end

.shared_examplesHash

Store for shared examples.

Returns:

  • (Hash)

    shared examples



43
44
45
# File 'lib/spectroscope.rb', line 43

def self.shared_examples
  @shared_examples ||= {}
end