Module: RspecRequestHelpers

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

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.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



16
17
18
# File 'lib/rspec_request_helpers.rb', line 16

def configuration
  @configuration
end

Class Method Details

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

Yields:



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

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

.included(receiver) ⇒ Object



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

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

.resetObject



23
24
25
# File 'lib/rspec_request_helpers.rb', line 23

def self.reset
  @configuration = Configuration.new
end