Sha256: ea3304d49b7ee4251a78ab2d415fb175711e2231b181aade193ed3a37ed06321

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

require_relative "../test_helper"
require "stig"
require "stig/generators/integer"

include Stig

setup { Stig::Generators::Integer }

test "takes a maximum value" do |mod|
  generator = generator_for(mod, 10)

  property(generator) do |integer|
    assert integer.between?(0, 10)

    true
  end
end

test "takes a range" do |mod|
  generator = generator_for(mod, 5..10)

  property(generator) do |integer|
    assert integer.between?(5, 10)

    true
  end
end

test "defaults to Integers between 0 and 100" do |mod|
  property(mod) do |integer|
    assert integer.between?(0, 100)

    true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stig-0.1.0 test/stig/integer_generator.rb