Sha256: 6b9d85f7928a64bd54d6a9633806022e9479c8477ae00416b36332bd3ab015fa

Contents?: true

Size: 653 Bytes

Versions: 1

Compression:

Stored size: 653 Bytes

Contents

require 'spec_helper'

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

    formats[:phone]

    formats.should be_loaded(:phone)
  end

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

    formats.reset!

    formats.should_not be_loaded(:phone)

    formats[:phone]

    formats.should be_loaded(:phone)
  end

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

    formats[:phone]

    formats.should be_loaded(:phone)

    formats.reset!

    formats.should_not be_loaded(:phone)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forgery-0.6.0 spec/formats_spec.rb