Module: NRSER::RSpex

Defined in:
lib/nrser/rspex/example.rb,
lib/nrser/rspex/example_group.rb,
lib/nrser/rspex/shared_examples.rb,
lib/nrser/rspex.rb

Overview

Extensions

Defined Under Namespace

Modules: Example, ExampleGroup, Format, SharedExamples Classes: Args, List, Opts

Constant Summary collapse

PREFIXES =

Symbol characters for specific example group types.

Sources:

{
  section: 'ยง',
  group: 'โ€ข',
  invocation: '๐‘“โŸฎ๐‘ฅโŸฏ',
}

Class Method Summary collapse

Class Method Details

.dot_rel_path(dest) ⇒ String

Get the relative path from the working directory with the โ€˜./` in front.

Parameters:

Returns:



188
189
190
# File 'lib/nrser/rspex.rb', line 188

def self.dot_rel_path dest
  File.join '.', dest.to_pn.relative_path_from( Pathname.getwd )
end

.format(*args) ⇒ return_type

TODO:

Document format method.

Returns @todo Document return value.

Parameters:

  • arg_name (type)

    @todo Add name param description.

Returns:

  • (return_type)

    @todo Document return value.



176
177
178
# File 'lib/nrser/rspex.rb', line 176

def self.format *args
  NRSER::RSpex::Format.description *args
end

.short_s(value, max = 64) ⇒ return_type

TODO:

Document short_s method.

Returns @todo Document return value.

Parameters:

  • arg_name (type)

    @todo Add name param description.

Returns:

  • (return_type)

    @todo Document return value.



163
164
165
# File 'lib/nrser/rspex.rb', line 163

def self.short_s value, max = 64
  NRSER.smart_ellipsis value.inspect, max
end