Sha256: 43d31dc7f0033b6ff32a436ec458323736a07a51b9c488b78a373ae755deec68

Contents?: true

Size: 735 Bytes

Versions: 9

Compression:

Stored size: 735 Bytes

Contents

require "spec_helper"

describe GettextSimpleRails::Translators::GlobalizeTranslator 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 "should generate translations for validations" do
    filepath = "#{GettextSimpleRails.translation_dir}/globalize_translator_translations.rb"
    cont = File.read(filepath)
    cont.should include "_('activerecord.attributes.user.title')"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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