Method: DuckTest::Config#framework

Defined in:
lib/duck_test/config.rb

#framework(key, options = {}) {|config| ... } ⇒ NilClass

Configures a framework

Parameters:

  • key (String, Symbol)

    Key is the name of the framework to configure. Key is converted to a Symbol regardless of what value is passed.

  • options (Hash) (defaults to: {})

    Options hash. No options implemented at this time. However, the Hash is passed to the block when executed.

Yields:

Returns:

  • (NilClass)


356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/duck_test/config.rb', line 356

def framework(key, options = {}, &block)
  prev_value = self.current_framework

  self.current_framework = key

  config = {framework: self.current_framework}.merge(options)

  yield config if block_given?

  self.current_framework = prev_value

  return nil
end