Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix build under ruby 1.8.7, ref #805

  • Loading branch information...
commit 7210ee977fe18ed5969028775d86aa399ea47c31 1 parent 4463c41
@justinfrench authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 spec/inputs/label_spec.rb
View
10 spec/inputs/label_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.