Module: Flores::RSpec

Defined in:
lib/flores/namespace.rb,
lib/flores/rspec.rb

Overview

The root of the rspec helpers the Flores library provides

Defined Under Namespace

Modules: Analyze, Formatters, Stress

Constant Summary collapse

DEFAULT_ITERATIONS =
1..1000

Class Method Summary collapse

Class Method Details

.configure(rspec_configuration) ⇒ Object

Sets up rspec with the Flores RSpec helpers. Usage looks like this:

RSpec.configure do |config|
  Flores::RSpec.configure(config)
end

29
30
31
32
33
34
# File 'lib/flores/rspec.rb', line 29

def self.configure(rspec_configuration)
  require "flores/rspec/stress"
  require "flores/rspec/analyze"
  rspec_configuration.extend(Flores::RSpec::Stress)
  rspec_configuration.extend(Flores::RSpec::Analyze)
end

.iterationsObject

def self.configure


36
37
38
39
40
41
42
43
44
# File 'lib/flores/rspec.rb', line 36

def self.iterations
  return @iterations if @iterations
  if ENV["ITERATIONS"]
    @iterations = 0..ENV["ITERATIONS"].to_i
  else
    @iterations = DEFAULT_ITERATIONS
  end
  @iterations
end