Sha256: 501022f661a25d38d63b9525af21b29e119d31b7c3bfb00807856bc01cd9112f

Contents?: true

Size: 890 Bytes

Versions: 1

Compression:

Stored size: 890 Bytes

Contents

# encoding: utf-8
# This file is part of ruby-flores.
# Copyright (C) 2015 Jordan Sissel
# 
# :nodoc:
require "flores/namespace"

# The root of the rspec helpers the Flores library provides
module Flores::RSpec
  DEFAULT_ITERATIONS = 1..1000

  # Sets up rspec with the Flores RSpec helpers. Usage looks like this:
  #
  #     RSpec.configure do |config|
  #       Flores::RSpec.configure(config)
  #     end
  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 # def self.configure

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flores-0.0.8 lib/flores/rspec.rb