module Flores::RSpec

The root of the rspec helpers the Flores library provides

Constants

DEFAULT_ITERATIONS

Public Class Methods

configure(rspec_configuration) click to toggle source

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

RSpec.configure do |config|
  Flores::RSpec.configure(config)
end
# 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
iterations() click to toggle source
# 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