Sha256: 1f345cd4c5d746a020138d8da29be48f5b55906cd7809a854c4783603397f848

Contents?: true

Size: 528 Bytes

Versions: 9

Compression:

Stored size: 528 Bytes

Contents

require 'spec/spec_helper'

describe 'unconfigured' do
  it "gives a useful error message when trying to just translate" do
    FastGettext.text_domain = nil
    begin
      FastGettext._('x')
      "".should == "success!?"
    rescue FastGettext::Storage::NoTextDomainConfigured
    end
  end

  it "gives a useful error message when only locale was set" do
    FastGettext.locale = 'de'
    begin
      FastGettext._('x')
      "".should == "success!?"
    rescue FastGettext::Storage::NoTextDomainConfigured
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fast_gettext-0.5.10 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.9 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.8 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.7 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.6 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.5 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.4 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.3 spec/aa_unconfigued_spec.rb
fast_gettext-0.5.2 spec/aa_unconfigued_spec.rb