Permalink
Browse files

fix build under ruby 1.8.7, ref #805

  • Loading branch information...
1 parent 4463c41 commit 7210ee977fe18ed5969028775d86aa399ea47c31 @justinfrench committed Feb 24, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 spec/inputs/label_spec.rb
View
@@ -12,20 +12,20 @@
it 'should add "required string" only once with caching enabled' do
with_config :i18n_cache_lookups, true do
- ::I18n.backend.store_translations :en, { formtastic: { labels: { post: { title: "I18n title" } } } }
+ ::I18n.backend.store_translations :en, { :formtastic => { :labels => { :post => { :title => "I18n title" } } } }
required_string = "[req_string]"
default_required_str = Formtastic::FormBuilder.required_string
Formtastic::FormBuilder.required_string = required_string
concat(semantic_form_for(@new_post) do |builder|
- builder.input(:title, required: true, label: true)
+ builder.input(:title, :required => true, :label => true)
end)
- output_buffer.clear
+ output_buffer.replace ''
concat(semantic_form_for(@new_post) do |builder|
- builder.input(:title, required: true, label: true)
+ builder.input(:title, :required => true, :label => true)
end)
- ::I18n.backend.store_translations :en, { formtastic: { labels: { post: { title: nil } } } }
+ ::I18n.backend.store_translations :en, { :formtastic => { :labels => { :post => { :title => nil } } } }
Formtastic::FormBuilder.required_string = default_required_str
output_buffer.scan(required_string).count.should == 1

0 comments on commit 7210ee9

Please sign in to comment.