Sha256: 6845a638ed648dc5410bb72afdaa515394f824d75f19a80bc910942a97559668

Contents?: true

Size: 697 Bytes

Versions: 10

Compression:

Stored size: 697 Bytes

Contents

require "spec_helper"

describe GettextSimpleRails::Translators::DateTranslator do
  before do
    # Make it possible to call the Rake task.
    ::Dummy::Application.load_tasks
    
    # Clean up any existing translations.
    FileUtils.rm_r(GettextSimpleRails.translation_dir) if File.exists?(GettextSimpleRails.translation_dir)
    
    # Generate model translations so we can check them.
    ::Rake::Task["gettext_simple_rails:generate_translator_files"].execute
  end
  
  it "generates month names translations" do
    filepath = "#{GettextSimpleRails.translation_dir}/date_translator_translations.rb"
    cont = File.read(filepath)
    cont.should include "_('date.day_names.6')"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gettext_simple_rails-0.0.19 spec/date_translator_spec.rb
gettext_simple_rails-0.0.17 spec/date_translator_spec.rb
gettext_simple_rails-0.0.16 spec/date_translator_spec.rb
gettext_simple_rails-0.0.15 spec/date_translator_spec.rb
gettext_simple_rails-0.0.14 spec/date_translator_spec.rb
gettext_simple_rails-0.0.13 spec/date_translator_spec.rb
gettext_simple_rails-0.0.12 spec/date_translator_spec.rb
gettext_simple_rails-0.0.11 spec/date_translator_spec.rb
gettext_simple_rails-0.0.10 spec/date_translator_spec.rb
gettext_simple_rails-0.0.9 spec/date_translator_spec.rb