Sha256: 7af8b2d2ac7c641e5a79a609b72fd48fb4fc5d77c307ff74f500f39592114e5e

Contents?: true

Size: 441 Bytes

Versions: 9

Compression:

Stored size: 441 Bytes

Contents

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

describe Post do
  it 'should be valid with both :ru and :en translations' do
    post = Post.new(:locale => :ru, :name => 'Privet')
    post.attributes = { :locale => :en, :name => 'Hello' }
    post.should be_valid
  end
  
  it 'should be invalid with only :ru translation' do
    post = Post.new(:locale => :ru, :name => 'Privet')
    post.should_not be_valid
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
simple_model_translations-0.1.9 spec/validations_spec.rb
simple_model_translations-0.1.8 spec/validations_spec.rb
simple_model_translations-0.1.7 spec/validations_spec.rb
simple_model_translations-0.1.6 spec/validations_spec.rb
simple_model_translations-0.1.4 spec/validations_spec.rb
simple_model_translations-0.1.3 spec/validations_spec.rb
simple_model_translations-0.1.2 spec/validations_spec.rb
simple_model_translations-0.1.1 spec/validations_spec.rb
simple_model_translations-0.1.0 spec/validations_spec.rb