Sha256: dec47874f3325fe132db7b06d2a7a917a4d373f6c62fc6950362c82d36242b72
Contents?: true
Size: 940 Bytes
Versions: 10
Compression:
Stored size: 940 Bytes
Contents
require File.expand_path('spec/spec_helper') module FastGettext module TranslationRepository class Dummy attr_accessor :name, :options def initialize(name, options) @name = name @options = options end end end end describe FastGettext::TranslationRepository do describe "build" do it "auto requires class by default" do lambda { FastGettext::TranslationRepository.build('xx', { :type => 'invalid'}) }.should raise_error(LoadError) end it "can have auto-require disabled" do FastGettext::TranslationRepository.build('xx', { :type => 'dummy' }) end it "makes a new repository" do options = { :type => 'dummy', :external => true } repo = FastGettext::TranslationRepository.build('xx', options) repo.class.should == FastGettext::TranslationRepository::Dummy repo.name.should == 'xx' repo.options.should == options end end end
Version data entries
10 entries across 10 versions & 1 rubygems