Sha256: 4360c18fed38df7d29c015ae97975968cc6715112f969927c526944c5687a23b

Contents?: true

Size: 777 Bytes

Versions: 1

Compression:

Stored size: 777 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

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

    dictionaries[:colors]

    dictionaries.should be_loaded(:colors)
  end

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

    dictionaries.reset!

    dictionaries.should_not be_loaded(:colors)

    dictionaries[:colors]

    dictionaries.should be_loaded(:colors)
  end

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

    dictionaries[:colors]

    dictionaries.should be_loaded(:colors)

    dictionaries.reset!

    dictionaries.should_not be_loaded(:colors)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forgery-0.3.0 spec/dictionaries_spec.rb