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



14
15
16
# File 'lib/rspec_in_context/in_context.rb', line 14

def block
  @block
end

#nameString | Symbol

represent the name by which the context can be find.

Returns:

  • (String | Symbol)

    the current value of name



14
15
16
# File 'lib/rspec_in_context/in_context.rb', line 14

def name
  @name
end

#namespaceString | Symbol

namespace for context names to avoid collisions

Returns:

  • (String | Symbol)

    the current value of namespace



14
15
16
# File 'lib/rspec_in_context/in_context.rb', line 14

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



14
15
16
# File 'lib/rspec_in_context/in_context.rb', line 14

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



14
15
16
# File 'lib/rspec_in_context/in_context.rb', line 14

def silent
  @silent
end