Module: RspecRequestHelpers

Defined in:
lib/rspec_request_helpers/helpers.rb,
lib/rspec_request_helpers.rb,
lib/rspec_request_helpers/version.rb,
lib/rspec_request_helpers/configuration.rb,
lib/generators/rspec_request_helpers/install/install_generator.rb

Overview

@Author: Andrii Baran @Date: 2019-12-09 15:05:38

Defined Under Namespace

Modules: Helpers Classes: Configuration, InstallGenerator

Constant Summary collapse

SYMBOL_TO_STATUS_CODE =
Rack::Utils::SYMBOL_TO_STATUS_CODE
STATUS_CODE_TO_SYMBOL =
SYMBOL_TO_STATUS_CODE.inject({}) do |hash, (symbol, code)|
  hash[code] = symbol
  hash
end
VERSION =
'0.3.3'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



21
22
23
# File 'lib/rspec_request_helpers.rb', line 21

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



32
33
34
35
# File 'lib/rspec_request_helpers.rb', line 32

def self.configure
  yield(configuration)
  Helpers.regenerate_helpers
end

.included(receiver) ⇒ Object



37
38
39
40
# File 'lib/rspec_request_helpers.rb', line 37

def self.included(receiver)
  Helpers.generate_helpers
  receiver.send :include, Helpers
end

.resetObject



28
29
30
# File 'lib/rspec_request_helpers.rb', line 28

def self.reset
  @configuration = Configuration.new
end