Sha256: a9b1f2546774de727a10de4b77502fd5a8fb641b3b65629b34bcf30b8095d6b1

Contents?: true

Size: 771 Bytes

Versions: 2

Compression:

Stored size: 771 Bytes

Contents

require 'spec_helper'

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

    dictionaries[:colors]

    expect(dictionaries).to be_loaded(:colors)
  end

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

    dictionaries.reset!

    expect(dictionaries).not_to be_loaded(:colors)

    dictionaries[:colors]

    expect(dictionaries).to be_loaded(:colors)
  end

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

    dictionaries[:colors]

    expect(dictionaries).to be_loaded(:colors)

    dictionaries.reset!

    expect(dictionaries).not_to be_loaded(:colors)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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