Sha256: 9770d667e8def696347ea032d64905a7b96ebdcb288bc3a830cb13583d6c29fc

Contents?: true

Size: 800 Bytes

Versions: 3

Compression:

Stored size: 800 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper')

module WebTranslateIt
  class I18n
  end
end

describe WebTranslateIt do
  
  before(:each) do
    WebTranslateIt::I18n.stub(:locale => 'en')
    WebTranslateIt::Configuration::Rails = OpenStruct.new(:root => Pathname.new(File.dirname(__FILE__) + "/examples"))
    @configuration = WebTranslateIt::Configuration.new
    @file = mock(WebTranslateIt::TranslationFile)
    @file.stub(:fetch => true, :locale => true)
    @configuration.stub(:files => [@file])
    WebTranslateIt::Configuration.stub(:new => @configuration)
    
  end
  
  describe "WebTranslateIt.fetch_translations" do
    it "should fetch the configuration" do
      WebTranslateIt::Configuration.should_receive(:new)
      WebTranslateIt.fetch_translations
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
web_translate_it-1.6.4 spec/web_translate_it_spec.rb
web_translate_it-1.6.3 spec/web_translate_it_spec.rb
web_translate_it-1.6.2 spec/web_translate_it_spec.rb