Permalink
Browse files

Add a spec that triggers a threaded error with the form builder

  • Loading branch information...
hudson-gev-art committed Feb 28, 2014
1 parent 691560c commit a37f34eb942bfae628b947d87d23c551d6b6d5ec
Showing with 15 additions and 0 deletions.
  1. +15 −0 spec/helpers/form_helper_spec.rb
@@ -193,5 +193,20 @@ class MyAwesomeCustomBuilder < Formtastic::FormBuilder
end
end
+ describe "Threaded Form Building" do
+ it "creates forms and adds an input in a threaded environment" do
+ threads = Array.new(1000).map{ Thread.new{create_form()} }
+ threads.map{ |t| t.join }
+ end
+
+ # Create the semantic form. Create the author input
+ def create_form
+ semantic_form_for(@new_post, :url => '/hello') do |builder|
+ input = builder.input :author
+ end
+ end
+
+ end
+
end

0 comments on commit a37f34e

Please sign in to comment.