Sha256: d8d23a8bb8f840315e373291702b0cb679c9278d877a8bb047a4976bf47ea5bc

Contents?: true

Size: 653 Bytes

Versions: 22

Compression:

Stored size: 653 Bytes

Contents

# coding: utf-8
require File.join(File.dirname(__FILE__), *%w[spec_helper])

describe 'Formtastic::SemanticFormBuilder-defaults' do
  
  # Note: This spec might make better sense somewhere else. Just temporary.
  
  describe "required string" do
    
    it "should render proc with I18n correctly" do
      ::I18n.backend.store_translations :en, :formtastic => {:required => 'Haha!'}
      
      required_string = Formtastic::SemanticFormBuilder.required_string
      required_string = required_string.is_a?(::Proc) ? required_string.call : required_string.to_s
      required_string.should == %{<abbr title="Haha!">*</abbr>}
    end
    
  end
  
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
formtastic-1.0.1 spec/defaults_spec.rb
formtastic-1.0.0 spec/defaults_spec.rb
formtastic-1.0.0.rc2 spec/defaults_spec.rb
formtastic-1.0.0.rc spec/defaults_spec.rb
formtastic-1.0.0.beta4 spec/defaults_spec.rb
formtastic-rails3-0.9.10.1 spec/defaults_spec.rb
formtastic-1.0.0.beta3 spec/defaults_spec.rb
formtastic-1.0.0.beta2 spec/defaults_spec.rb
formtastic-1.0.0.beta spec/defaults_spec.rb
formtastic-rails3-0.9.10.0 spec/defaults_spec.rb
formtastic-0.9.10 spec/defaults_spec.rb
formtastic-0.9.9 spec/defaults_spec.rb
formtastic-0.9.8 spec/defaults_spec.rb
formtastic-rails3-0.9.7 spec/defaults_spec.rb
jintastic-1.1.0 vendor/plugins/formtastic/spec/defaults_spec.rb
jintastic-1.0.2 vendor/plugins/formtastic/spec/defaults_spec.rb
tmayad-formtastic-0.9.7 spec/defaults_spec.rb
ShadowBelmolve-formtastic-0.9.7 spec/defaults_spec.rb
formtastic-0.9.7 spec/defaults_spec.rb
formtastic-0.9.6 spec/defaults_spec.rb