Class: RspecInContext::Context

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec_in_context/in_context.rb

Overview

Context struct

Instance Attribute Summary collapse

Instance Attribute Details

#blockProc

what will be executed in the test context

Returns:

  • (Proc)

    the current value of block



29
30
31
# File 'lib/rspec_in_context/in_context.rb', line 29

def block
  @block
end

#nameString | Symbol

represent the name by which the context can be found.

Returns:

  • (String | Symbol)

    the current value of name



29
30
31
# File 'lib/rspec_in_context/in_context.rb', line 29

def name
  @name
end

#namespaceString | Symbol

namespace for context names to avoid collisions

Returns:

  • (String | Symbol)

    the current value of namespace



29
30
31
# File 'lib/rspec_in_context/in_context.rb', line 29

def namespace
  @namespace
end

#ownerClass

current rspec context class. This will be used to know where a define_context has been defined

Returns:

  • (Class)

    the current value of owner



29
30
31
# File 'lib/rspec_in_context/in_context.rb', line 29

def owner
  @owner
end

#silentBoolean

does the in_context wrap itself into a context with its name or an anonymous context

Returns:

  • (Boolean)

    the current value of silent



29
30
31
# File 'lib/rspec_in_context/in_context.rb', line 29

def silent
  @silent
end