Sha256: e0ae20be9acab8d1b423df3008ea3946a893f55c318bf26831af4bf4c4187630

Contents?: true

Size: 392 Bytes

Versions: 1

Compression:

Stored size: 392 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'bigdecimal'

describe Forgery::Monetary do
  it 'should return random number string' do
    expect(Forgery(:monetary).money).to match(/^[\d+\.]+$/)
  end

  it 'should return random number respecting min and max parameters' do
    expect(BigDecimal(Forgery(:monetary).money({ min: 10, max: 20 }))).to be_between(10, 20)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forgery-0.8.1 spec/forgery/monetary_spec.rb