Sha256: d72c9dd9f444615158e18b7fda471a974d9d2be6dd0ae0d9c20ff3ce255216c2

Contents?: true

Size: 673 Bytes

Versions: 2

Compression:

Stored size: 673 Bytes

Contents

require 'spec_helper'

describe Forgery::Formats do
  it "should check if the dictionary is loaded" do
    formats = Forgery::Formats.new

    formats[:phone]

    expect(formats).to be_loaded(:phone)
  end

  it "should load a dictionary when called by the key" do
    formats = Forgery::Formats.new

    formats.reset!

    expect(formats).not_to be_loaded(:phone)

    formats[:phone]

    expect(formats).to be_loaded(:phone)
  end

  it "should clear the loaded formats when calling reset!" do
    formats = Forgery::Formats.new

    formats[:phone]

    expect(formats).to be_loaded(:phone)

    formats.reset!

    expect(formats).not_to be_loaded(:phone)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgery-0.8.1 spec/formats_spec.rb
forgery-0.7.0 spec/formats_spec.rb