Sha256: 0dafc0dc49f250761a9e7cf6c0c49150918e49e909af0b6945bd45fd62b7c4f3

Contents?: true

Size: 493 Bytes

Versions: 14

Compression:

Stored size: 493 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Tag do
  it "should be" do
    tag = Tag.create!(:locale => :en, :name => 'hello')
    tag.name = 'hello, ukraine!'
    tag.reload
    tag.name.should be_nil
    I18n.locale = :en
    tag.name.should == 'hello'
  end
  
  it "should create translation class automatically if it doesn't exists" do
    Tag.translation_class.should_not be_nil
    Tag.translation_class.table_name.should == 'tag_translations'
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
simple_model_translations-0.2.8 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.7 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.6 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.5 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.4 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.3 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.2 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.1 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.2.0 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.1.9 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.1.8 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.1.7 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.1.6 spec/auto_generated_translation_classes_spec.rb
simple_model_translations-0.1.4 spec/auto_generated_translation_classes_spec.rb