bootstrap_form 2.5.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f3eb2d5aa6aa2c57f095c5a6cccc6c84862f773
4
- data.tar.gz: 6fa4bfdd16f45dbaa10e7080f9d32e46fa4c1d87
3
+ metadata.gz: 74371be532df90ad58349ff61a280d5d5181fdd2
4
+ data.tar.gz: b198550bfafbc2d56416fcc239b3aa75355eb736
5
5
  SHA512:
6
- metadata.gz: 954d3f340e65b560e13a331b8b975438c806307ba4a9b94ca515944806f02a7438503d2700b0af3128e715c40646e7efac58a4b00b3c6bf0abf90884b5e7dd34
7
- data.tar.gz: 80945996afa89f8a50a14d8707ecb03c5b919596e05723c33e9dcfb84c3c993c88b0783b562ce364205ddefbbea8b021ffd77a50f70842b14418cc9ef0ec7215
6
+ metadata.gz: 64aab98c2cc38d0845539909ccff000d7a9e2408eac68f858dfae827596e434de15caeacc6dbe9994ec1853f5fc5becad134641ad98857ba605f5cf29acb08f9
7
+ data.tar.gz: 3bc51f566eea0f8e87128998803ae6fbd127701aa13a1b8e8b14188859e541e6da5e70b36d698e5263c2ced1f44c9f70e04bd8e21d3a4bc2f411d89ad0d5aced
@@ -206,7 +206,7 @@ module BootstrapForm
206
206
  if get_group_layout(options[:layout]) == :horizontal
207
207
  control_class = options[:control_col] || control_col
208
208
  unless options[:label]
209
- control_offset = offset_col(/([0-9]+)$/.match(options[:label_col] || @label_col))
209
+ control_offset = offset_col(options[:label_col] || @label_col)
210
210
  control_class = "#{control_class} #{control_offset}"
211
211
  end
212
212
  control = content_tag(:div, control, class: control_class)
@@ -242,8 +242,8 @@ module BootstrapForm
242
242
  "col-sm-2"
243
243
  end
244
244
 
245
- def offset_col(offset)
246
- "col-sm-offset-#{offset}"
245
+ def offset_col(label_col)
246
+ label_col.sub(/^col-(\w+)-(\d)$/, 'col-\1-offset-\2')
247
247
  end
248
248
 
249
249
  def default_control_col
@@ -425,10 +425,14 @@ module BootstrapForm
425
425
  end
426
426
 
427
427
  def get_help_text_by_i18n_key(name)
428
- if object
428
+ if object
429
429
 
430
- # ActiveModel::Naming 3.X.X does not support .name; it is supported as of 4.X.X
431
- partial_scope = object.class.model_name.respond_to?(:name) ? object.class.model_name.name : object.class.model_name
430
+ if object.class.respond_to?(:model_name)
431
+ # ActiveModel::Naming 3.X.X does not support .name; it is supported as of 4.X.X
432
+ partial_scope = object.class.model_name.respond_to?(:name) ? object.class.model_name.name : object.class.model_name
433
+ else
434
+ partial_scope = object.class.name
435
+ end
432
436
 
433
437
  underscored_scope = "activerecord.help.#{partial_scope.underscore}"
434
438
  downcased_scope = "activerecord.help.#{partial_scope.downcase}"
@@ -438,7 +442,7 @@ module BootstrapForm
438
442
  text
439
443
  end
440
444
  help_text
441
- end
445
+ end
442
446
  end
443
447
 
444
448
  end
@@ -1,3 +1,3 @@
1
1
  module BootstrapForm
2
- VERSION = "2.5.1".freeze
2
+ VERSION = "2.5.2".freeze
3
3
  end
@@ -146,6 +146,11 @@ class BootstrapFormTest < ActionView::TestCase
146
146
  assert_equal expected, bootstrap_form_for(@user, layout: :horizontal) { |f| f.email_field :email, label_col: 'col-sm-1' }
147
147
  end
148
148
 
149
+ test "offset for form group without label respects label width for horizontal forms" do
150
+ expected = %{<form accept-charset="UTF-8" action="/users" class="form-horizontal" id="new_user" method="post" role="form"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div><div class="form-group"><div class="col-md-10 col-md-offset-2"><input class="btn btn-default" name="commit" type="submit" value="Create User" /></div></div></form>}
151
+ assert_equal expected, bootstrap_form_for(@user, layout: :horizontal, label_col: 'col-md-2', control_col: 'col-md-10') { |f| f.form_group { f.submit } }
152
+ end
153
+
149
154
  test "custom input width for horizontal forms" do
150
155
  expected = %{<form accept-charset="UTF-8" action="/users" class="form-horizontal" id="new_user" method="post" role="form"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div><div class="form-group"><label class="control-label col-sm-2 required" for="user_email">Email</label><div class="col-sm-5"><input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com" /></div></div></form>}
151
156
  assert_equal expected, bootstrap_form_for(@user, layout: :horizontal) { |f| f.email_field :email, control_col: 'col-sm-5' }
@@ -0,0 +1,9 @@
1
+ class FauxUser
2
+ attr_accessor :email, :password, :comments, :misc
3
+
4
+ def initialize(attributes = {})
5
+ attributes.each do |name, value|
6
+ send("#{name}=", value)
7
+ end
8
+ end
9
+ end
@@ -24280,3 +24280,788 @@ SpecialFormClassModelsTest: test_Anonymous_models_are_supported_for_form_builder
24280
24280
  SpecialFormClassModelsTest: test_Nil_models_are_supported_for_form_builder
24281
24281
  --------------------------------------------------------------------------
24282
24282
   (0.0ms) rollback transaction
24283
+  (0.3ms) begin transaction
24284
+ -------------------------------------------------------------------------
24285
+ BootstrapCheckboxTest: test_check_box_accepts_a_block_to_define_the_label
24286
+ -------------------------------------------------------------------------
24287
+  (0.1ms) rollback transaction
24288
+  (0.0ms) begin transaction
24289
+ ------------------------------------------------------------------
24290
+ BootstrapCheckboxTest: test_check_box_accepts_a_custom_label_class
24291
+ ------------------------------------------------------------------
24292
+  (0.1ms) rollback transaction
24293
+  (0.0ms) begin transaction
24294
+ ----------------------------------------------------------
24295
+ BootstrapCheckboxTest: test_check_box_is_wrapped_correctly
24296
+ ----------------------------------------------------------
24297
+  (0.0ms) rollback transaction
24298
+  (0.0ms) begin transaction
24299
+ -------------------------------------------------------
24300
+ BootstrapCheckboxTest: test_check_box_label_allows_html
24301
+ -------------------------------------------------------
24302
+  (0.0ms) rollback transaction
24303
+  (0.0ms) begin transaction
24304
+ ---------------------------------------------------------------------------------------------
24305
+ BootstrapCheckboxTest: test_check_box_responds_to_checked_value_and_unchecked_value_arguments
24306
+ ---------------------------------------------------------------------------------------------
24307
+  (0.0ms) rollback transaction
24308
+  (0.0ms) begin transaction
24309
+ --------------------------------------------------------------------------------------
24310
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_inline_checkboxes_correctly
24311
+ --------------------------------------------------------------------------------------
24312
+  (0.1ms) rollback transaction
24313
+  (0.0ms) begin transaction
24314
+ ----------------------------------------------------------------------------------------
24315
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_multiple_checkboxes_correctly
24316
+ ----------------------------------------------------------------------------------------
24317
+  (0.0ms) rollback transaction
24318
+  (0.0ms) begin transaction
24319
+ ---------------------------------------------------------------------------------------------------------------------------------
24320
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_multiple_checkboxes_with_labels_defined_by_Proc_:text_method_correctly
24321
+ ---------------------------------------------------------------------------------------------------------------------------------
24322
+  (0.0ms) rollback transaction
24323
+  (0.0ms) begin transaction
24324
+ -----------------------------------------------------------------------------------------------------------------------------------
24325
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_multiple_checkboxes_with_labels_defined_by_lambda_:text_method_correctly
24326
+ -----------------------------------------------------------------------------------------------------------------------------------
24327
+  (0.0ms) rollback transaction
24328
+  (0.0ms) begin transaction
24329
+ ----------------------------------------------------------------------------------------------------------------------------------
24330
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_multiple_checkboxes_with_values_defined_by_Proc_:value_method_correctly
24331
+ ----------------------------------------------------------------------------------------------------------------------------------
24332
+  (0.0ms) rollback transaction
24333
+  (0.0ms) begin transaction
24334
+ ------------------------------------------------------------------------------------------------------------------------------------
24335
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_multiple_checkboxes_with_values_defined_by_lambda_:value_method_correctly
24336
+ ------------------------------------------------------------------------------------------------------------------------------------
24337
+  (0.0ms) rollback transaction
24338
+  (0.0ms) begin transaction
24339
+ -----------------------------------------------------------------------------------
24340
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_the_form_group_correctly
24341
+ -----------------------------------------------------------------------------------
24342
+  (0.0ms) rollback transaction
24343
+  (0.1ms) begin transaction
24344
+ ----------------------------------------------------------------------------------------
24345
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_with_checked_option_correctly
24346
+ ----------------------------------------------------------------------------------------
24347
+  (0.0ms) rollback transaction
24348
+  (0.0ms) begin transaction
24349
+ ----------------------------------------------------------------------------------------------------------------
24350
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_with_checked_option_correctly_with_Proc_:value_method
24351
+ ----------------------------------------------------------------------------------------------------------------
24352
+  (0.1ms) rollback transaction
24353
+  (0.0ms) begin transaction
24354
+ --------------------------------------------------------------------------------------------------
24355
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_with_multiple_checked_options_correctly
24356
+ --------------------------------------------------------------------------------------------------
24357
+  (0.1ms) rollback transaction
24358
+  (0.1ms) begin transaction
24359
+ ----------------------------------------------------------------------------------------------------------------------------
24360
+ BootstrapCheckboxTest: test_collection_check_boxes_renders_with_multiple_checked_options_correctly_with_lambda_:value_method
24361
+ ----------------------------------------------------------------------------------------------------------------------------
24362
+  (0.0ms) rollback transaction
24363
+  (0.0ms) begin transaction
24364
+ -----------------------------------------------------------------------------------------------
24365
+ BootstrapCheckboxTest: test_collection_check_boxes_sanitizes_values_when_generating_label_`for`
24366
+ -----------------------------------------------------------------------------------------------
24367
+  (0.0ms) rollback transaction
24368
+  (0.0ms) begin transaction
24369
+ -------------------------------------------------------------------------
24370
+ BootstrapCheckboxTest: test_disabled_check_box_has_proper_wrapper_classes
24371
+ -------------------------------------------------------------------------
24372
+  (0.1ms) rollback transaction
24373
+  (0.0ms) begin transaction
24374
+ -----------------------------------------------------
24375
+ BootstrapCheckboxTest: test_disabled_inline_check_box
24376
+ -----------------------------------------------------
24377
+  (0.0ms) rollback transaction
24378
+  (0.0ms) begin transaction
24379
+ ---------------------------------------------
24380
+ BootstrapCheckboxTest: test_inline_checkboxes
24381
+ ---------------------------------------------
24382
+  (0.1ms) rollback transaction
24383
+  (0.0ms) begin transaction
24384
+ ---------------------------------------------------------------------
24385
+ BootstrapCheckboxTest: test_inline_checkboxes_with_custom_label_class
24386
+ ---------------------------------------------------------------------
24387
+  (0.1ms) rollback transaction
24388
+  (0.0ms) begin transaction
24389
+ --------------------------------------------------------------------------
24390
+ BootstrapFieldsTest: test_bootstrap_form_for_helper_works_for_associations
24391
+ --------------------------------------------------------------------------
24392
+  (0.1ms) rollback transaction
24393
+  (0.0ms) begin transaction
24394
+ ----------------------------------------------------------------------------------------
24395
+ BootstrapFieldsTest: test_bootstrap_form_for_helper_works_for_serialized_hash_attributes
24396
+ ----------------------------------------------------------------------------------------
24397
+  (0.0ms) rollback transaction
24398
+  (0.0ms) begin transaction
24399
+ ------------------------------------------------------------
24400
+ BootstrapFieldsTest: test_color_fields_are_wrapped_correctly
24401
+ ------------------------------------------------------------
24402
+  (0.1ms) rollback transaction
24403
+  (0.0ms) begin transaction
24404
+ -----------------------------------------------------------
24405
+ BootstrapFieldsTest: test_date_fields_are_wrapped_correctly
24406
+ -----------------------------------------------------------
24407
+  (0.1ms) rollback transaction
24408
+  (0.1ms) begin transaction
24409
+ ----------------------------------------------------------------
24410
+ BootstrapFieldsTest: test_date_time_fields_are_wrapped_correctly
24411
+ ----------------------------------------------------------------
24412
+  (0.1ms) rollback transaction
24413
+  (0.0ms) begin transaction
24414
+ ----------------------------------------------------------------------
24415
+ BootstrapFieldsTest: test_date_time_local_fields_are_wrapped_correctly
24416
+ ----------------------------------------------------------------------
24417
+  (0.1ms) rollback transaction
24418
+  (0.0ms) begin transaction
24419
+ ------------------------------------------------------------
24420
+ BootstrapFieldsTest: test_email_fields_are_wrapped_correctly
24421
+ ------------------------------------------------------------
24422
+  (0.1ms) rollback transaction
24423
+  (0.0ms) begin transaction
24424
+ ------------------------------------------------------------------------------------------
24425
+ BootstrapFieldsTest: test_fields_for_correctly_passes_horizontal_style_from_parent_builder
24426
+ ------------------------------------------------------------------------------------------
24427
+  (0.0ms) rollback transaction
24428
+  (0.0ms) begin transaction
24429
+ --------------------------------------------------------------------------------------
24430
+ BootstrapFieldsTest: test_fields_for_correctly_passes_inline_style_from_parent_builder
24431
+ --------------------------------------------------------------------------------------
24432
+  (0.0ms) rollback transaction
24433
+  (0.0ms) begin transaction
24434
+ -----------------------------------------------------------
24435
+ BootstrapFieldsTest: test_file_fields_are_wrapped_correctly
24436
+ -----------------------------------------------------------
24437
+  (0.1ms) rollback transaction
24438
+  (0.1ms) begin transaction
24439
+ -----------------------------------------------------
24440
+ BootstrapFieldsTest: test_hidden_fields_are_supported
24441
+ -----------------------------------------------------
24442
+  (0.1ms) rollback transaction
24443
+  (0.1ms) begin transaction
24444
+ ------------------------------------------------------------------
24445
+ BootstrapFieldsTest: test_month_local_fields_are_wrapped_correctly
24446
+ ------------------------------------------------------------------
24447
+  (0.1ms) rollback transaction
24448
+  (0.0ms) begin transaction
24449
+ -------------------------------------------------------------
24450
+ BootstrapFieldsTest: test_number_fields_are_wrapped_correctly
24451
+ -------------------------------------------------------------
24452
+  (0.1ms) rollback transaction
24453
+  (0.0ms) begin transaction
24454
+ ---------------------------------------------------------------
24455
+ BootstrapFieldsTest: test_password_fields_are_wrapped_correctly
24456
+ ---------------------------------------------------------------
24457
+  (0.1ms) rollback transaction
24458
+  (0.0ms) begin transaction
24459
+ ----------------------------------------------------------------------
24460
+ BootstrapFieldsTest: test_phone/telephone_fields_are_wrapped_correctly
24461
+ ----------------------------------------------------------------------
24462
+  (0.1ms) rollback transaction
24463
+  (0.1ms) begin transaction
24464
+ ------------------------------------------------------------
24465
+ BootstrapFieldsTest: test_range_fields_are_wrapped_correctly
24466
+ ------------------------------------------------------------
24467
+  (0.1ms) rollback transaction
24468
+  (0.0ms) begin transaction
24469
+ -------------------------------------------------------------
24470
+ BootstrapFieldsTest: test_search_fields_are_wrapped_correctly
24471
+ -------------------------------------------------------------
24472
+  (0.1ms) rollback transaction
24473
+  (0.1ms) begin transaction
24474
+ ----------------------------------------------------------
24475
+ BootstrapFieldsTest: test_text_areas_are_wrapped_correctly
24476
+ ----------------------------------------------------------
24477
+  (0.0ms) rollback transaction
24478
+  (0.1ms) begin transaction
24479
+ -----------------------------------------------------------
24480
+ BootstrapFieldsTest: test_text_fields_are_wrapped_correctly
24481
+ -----------------------------------------------------------
24482
+  (0.0ms) rollback transaction
24483
+  (0.1ms) begin transaction
24484
+ -----------------------------------------------------------
24485
+ BootstrapFieldsTest: test_time_fields_are_wrapped_correctly
24486
+ -----------------------------------------------------------
24487
+  (0.1ms) rollback transaction
24488
+  (0.0ms) begin transaction
24489
+ ----------------------------------------------------------
24490
+ BootstrapFieldsTest: test_url_fields_are_wrapped_correctly
24491
+ ----------------------------------------------------------
24492
+  (0.0ms) rollback transaction
24493
+  (0.0ms) begin transaction
24494
+ -----------------------------------------------------------
24495
+ BootstrapFieldsTest: test_week_fields_are_wrapped_correctly
24496
+ -----------------------------------------------------------
24497
+  (0.1ms) rollback transaction
24498
+  (0.0ms) begin transaction
24499
+ ---------------------------------------------------------------------------
24500
+ BootstrapFormGroupTest: test_:input_group_class_should_apply_to_input-group
24501
+ ---------------------------------------------------------------------------
24502
+  (0.0ms) rollback transaction
24503
+  (0.0ms) begin transaction
24504
+ --------------------------------------------------------------------------------------------------------------
24505
+ BootstrapFormGroupTest: test_adding_a_custom_label_and_changing_the_label_text_via_the_html_options_label_hash
24506
+ --------------------------------------------------------------------------------------------------------------
24507
+  (0.0ms) rollback transaction
24508
+  (0.0ms) begin transaction
24509
+ ----------------------------------------------------------------------------------------
24510
+ BootstrapFormGroupTest: test_adding_a_custom_label_class_via_the_html_options_label_hash
24511
+ ----------------------------------------------------------------------------------------
24512
+  (0.0ms) rollback transaction
24513
+  (0.0ms) begin transaction
24514
+ --------------------------------------------------------------------------------------
24515
+ BootstrapFormGroupTest: test_adding_a_custom_label_class_via_the_label_class_parameter
24516
+ --------------------------------------------------------------------------------------
24517
+  (0.0ms) rollback transaction
24518
+  (0.0ms) begin transaction
24519
+ ------------------------------------------------------
24520
+ BootstrapFormGroupTest: test_adding_an_icon_to_a_field
24521
+ ------------------------------------------------------
24522
+  (0.0ms) rollback transaction
24523
+  (0.0ms) begin transaction
24524
+ -----------------------------------------------
24525
+ BootstrapFormGroupTest: test_adding_append_text
24526
+ -----------------------------------------------
24527
+  (0.1ms) rollback transaction
24528
+  (0.0ms) begin transaction
24529
+ ----------------------------------------------------------------
24530
+ BootstrapFormGroupTest: test_adding_both_prepend_and_append_text
24531
+ ----------------------------------------------------------------
24532
+  (0.0ms) rollback transaction
24533
+  (0.0ms) begin transaction
24534
+ ------------------------------------------------
24535
+ BootstrapFormGroupTest: test_adding_prepend_text
24536
+ ------------------------------------------------
24537
+  (0.0ms) rollback transaction
24538
+  (0.0ms) begin transaction
24539
+ ------------------------------------------------------------------------
24540
+ BootstrapFormGroupTest: test_adds_class_to_wrapped_form_group_by_a_field
24541
+ ------------------------------------------------------------------------
24542
+  (0.0ms) rollback transaction
24543
+  (0.0ms) begin transaction
24544
+ ------------------------------------------------------------------------------------
24545
+ BootstrapFormGroupTest: test_adds_class_to_wrapped_form_group_by_a_field_with_errors
24546
+ ------------------------------------------------------------------------------------
24547
+  (0.0ms) rollback transaction
24548
+  (0.0ms) begin transaction
24549
+ --------------------------------------------------------------------------------------------------------------------
24550
+ BootstrapFormGroupTest: test_adds_class_to_wrapped_form_group_by_a_field_with_errors_when_bootstrap_form_for_is_used
24551
+ --------------------------------------------------------------------------------------------------------------------
24552
+  (0.0ms) rollback transaction
24553
+  (0.0ms) begin transaction
24554
+ -----------------------------------------------------------------------------------
24555
+ BootstrapFormGroupTest: test_adds_data-attributes_(or_any_other_options)_to_wrapper
24556
+ -----------------------------------------------------------------------------------
24557
+  (0.0ms) rollback transaction
24558
+  (0.0ms) begin transaction
24559
+ ---------------------------------------------------------------------
24560
+ BootstrapFormGroupTest: test_adds_offset_for_form_group_without_label
24561
+ ---------------------------------------------------------------------
24562
+  (0.0ms) rollback transaction
24563
+  (0.0ms) begin transaction
24564
+ --------------------------------------------------------------------------------------------
24565
+ BootstrapFormGroupTest: test_adds_offset_for_form_group_without_label_but_specific_label_col
24566
+ --------------------------------------------------------------------------------------------
24567
+  (0.0ms) rollback transaction
24568
+  (0.0ms) begin transaction
24569
+ ------------------------------------------------------
24570
+ BootstrapFormGroupTest: test_append_and_prepend_button
24571
+ ------------------------------------------------------
24572
+  (0.0ms) rollback transaction
24573
+  (0.0ms) begin transaction
24574
+ ------------------------------------------------------------------------------------
24575
+ BootstrapFormGroupTest: test_changing_the_label_text_via_the_html_options_label_hash
24576
+ ------------------------------------------------------------------------------------
24577
+  (0.0ms) rollback transaction
24578
+  (0.0ms) begin transaction
24579
+ -----------------------------------------------------------------------------------
24580
+ BootstrapFormGroupTest: test_changing_the_label_text_via_the_label_option_parameter
24581
+ -----------------------------------------------------------------------------------
24582
+  (0.0ms) rollback transaction
24583
+  (0.1ms) begin transaction
24584
+ ------------------------------------------------------------
24585
+ BootstrapFormGroupTest: test_custom_form_group_layout_option
24586
+ ------------------------------------------------------------
24587
+  (0.0ms) rollback transaction
24588
+  (0.0ms) begin transaction
24589
+ ----------------------------------------------------------------------------------------------------
24590
+ BootstrapFormGroupTest: test_doesn't_throw_undefined_method_error_when_the_content_block_returns_nil
24591
+ ----------------------------------------------------------------------------------------------------
24592
+  (0.0ms) rollback transaction
24593
+  (0.0ms) begin transaction
24594
+ --------------------------------------------------------------------------
24595
+ BootstrapFormGroupTest: test_form_group_accepts_class_thorugh_options_hash
24596
+ --------------------------------------------------------------------------
24597
+  (0.0ms) rollback transaction
24598
+  (0.0ms) begin transaction
24599
+ -------------------------------------------------------------------------------------------------
24600
+ BootstrapFormGroupTest: test_form_group_accepts_class_thorugh_options_hash_without_needing_a_name
24601
+ -------------------------------------------------------------------------------------------------
24602
+  (0.0ms) rollback transaction
24603
+  (0.1ms) begin transaction
24604
+ ------------------------------------------------------------------------------------------------
24605
+ BootstrapFormGroupTest: test_form_group_adds_a_spacer_when_no_label_exists_for_a_horizontal_form
24606
+ ------------------------------------------------------------------------------------------------
24607
+  (0.1ms) rollback transaction
24608
+  (0.0ms) begin transaction
24609
+ -------------------------------------------------------------------------------------------------------------------
24610
+ BootstrapFormGroupTest: test_form_group_creates_a_valid_structure_and_allows_arbitrary_html_to_be_added_via_a_block
24611
+ -------------------------------------------------------------------------------------------------------------------
24612
+  (0.0ms) rollback transaction
24613
+  (0.0ms) begin transaction
24614
+ ---------------------------------------------------------------------------------------------------------------
24615
+ BootstrapFormGroupTest: test_form_group_overrides_the_label's_'class'_and_'for'_attributes_if_others_are_passed
24616
+ ---------------------------------------------------------------------------------------------------------------
24617
+  (0.0ms) rollback transaction
24618
+  (0.0ms) begin transaction
24619
+ ---------------------------------------------------------------------------------------------------------------
24620
+ BootstrapFormGroupTest: test_form_group_renders_the_"error"_class_and_message_corrrectly_when_object_is_invalid
24621
+ ---------------------------------------------------------------------------------------------------------------
24622
+  (0.0ms) rollback transaction
24623
+  (0.0ms) begin transaction
24624
+ -------------------------------------------------------------------
24625
+ BootstrapFormGroupTest: test_form_group_renders_the_label_correctly
24626
+ -------------------------------------------------------------------
24627
+  (0.0ms) rollback transaction
24628
+  (0.1ms) begin transaction
24629
+ ------------------------------------------------------------
24630
+ BootstrapFormGroupTest: test_help_messages_for_default_forms
24631
+ ------------------------------------------------------------
24632
+  (0.0ms) rollback transaction
24633
+  (0.0ms) begin transaction
24634
+ ---------------------------------------------------------------
24635
+ BootstrapFormGroupTest: test_help_messages_for_horizontal_forms
24636
+ ---------------------------------------------------------------
24637
+  (0.0ms) rollback transaction
24638
+  (0.1ms) begin transaction
24639
+ ----------------------------------------------------------------------------------------
24640
+ BootstrapFormGroupTest: test_help_messages_to_ignore_translation_when_user_disables_help
24641
+ ----------------------------------------------------------------------------------------
24642
+  (0.1ms) rollback transaction
24643
+  (0.1ms) begin transaction
24644
+ ------------------------------------------------------------------------
24645
+ BootstrapFormGroupTest: test_help_messages_to_look_up_I18n_automatically
24646
+ ------------------------------------------------------------------------
24647
+  (0.0ms) rollback transaction
24648
+  (0.0ms) begin transaction
24649
+ ----------------------------------------------------------------------------
24650
+ BootstrapFormGroupTest: test_help_messages_to_warn_about_deprecated_I18n_key
24651
+ ----------------------------------------------------------------------------
24652
+  (0.0ms) rollback transaction
24653
+  (0.0ms) begin transaction
24654
+ -------------------------------------------
24655
+ BootstrapFormGroupTest: test_hiding_a_label
24656
+ -------------------------------------------
24657
+  (0.0ms) rollback transaction
24658
+  (0.0ms) begin transaction
24659
+ ---------------------------------------------------------------------------------------
24660
+ BootstrapFormGroupTest: test_non-default_column_span_on_form_is_reflected_in_form_group
24661
+ ---------------------------------------------------------------------------------------
24662
+  (0.0ms) rollback transaction
24663
+  (0.0ms) begin transaction
24664
+ --------------------------------------------------------------------------
24665
+ BootstrapFormGroupTest: test_non-default_column_span_on_form_isn't_mutated
24666
+ --------------------------------------------------------------------------
24667
+  (0.0ms) rollback transaction
24668
+  (0.0ms) begin transaction
24669
+ ---------------------------------------------------------------------------------
24670
+ BootstrapFormGroupTest: test_passing_options_to_a_form_control_get_passed_through
24671
+ ---------------------------------------------------------------------------------
24672
+  (0.0ms) rollback transaction
24673
+  (0.0ms) begin transaction
24674
+ ------------------------------------------------------------------------------
24675
+ BootstrapFormGroupTest: test_preventing_a_label_from_having_the_required_class
24676
+ ------------------------------------------------------------------------------
24677
+  (0.0ms) rollback transaction
24678
+  (0.0ms) begin transaction
24679
+ -------------------------------------------------------------------------------------------------
24680
+ BootstrapFormGroupTest: test_single_form_group_call_in_horizontal_form_should_not_be_smash_design
24681
+ -------------------------------------------------------------------------------------------------
24682
+  (0.0ms) rollback transaction
24683
+  (0.0ms) begin transaction
24684
+ ---------------------------------------------
24685
+ BootstrapFormGroupTest: test_skipping_a_label
24686
+ ---------------------------------------------
24687
+  (0.0ms) rollback transaction
24688
+  (0.0ms) begin transaction
24689
+ -------------------------------------------------------------------------------
24690
+ BootstrapFormTest: test_alert_message_allows_the_error_summary_to_be_turned_off
24691
+ -------------------------------------------------------------------------------
24692
+  (0.1ms) rollback transaction
24693
+  (0.0ms) begin transaction
24694
+ ----------------------------------------------------------------------------------------------------------------
24695
+ BootstrapFormTest: test_alert_message_allows_the_error_summary_to_be_turned_on_with_inline_errors_also_turned_on
24696
+ ----------------------------------------------------------------------------------------------------------------
24697
+  (0.0ms) rollback transaction
24698
+  (0.0ms) begin transaction
24699
+ --------------------------------------------------------------------------------------------------
24700
+ BootstrapFormTest: test_alert_message_contains_the_error_summary_when_inline_errors_are_turned_off
24701
+ --------------------------------------------------------------------------------------------------
24702
+  (0.1ms) rollback transaction
24703
+  (0.0ms) begin transaction
24704
+ ----------------------------------------------------------
24705
+ BootstrapFormTest: test_alert_message_is_wrapped_correctly
24706
+ ----------------------------------------------------------
24707
+  (0.0ms) rollback transaction
24708
+  (0.1ms) begin transaction
24709
+ --------------------------------------------------------
24710
+ BootstrapFormTest: test_allows_the_form_object_to_be_nil
24711
+ --------------------------------------------------------
24712
+  (0.0ms) rollback transaction
24713
+  (0.1ms) begin transaction
24714
+ ---------------------------------------------------------------
24715
+ BootstrapFormTest: test_bootstrap_form_tag_acts_like_a_form_tag
24716
+ ---------------------------------------------------------------
24717
+  (0.0ms) rollback transaction
24718
+  (0.1ms) begin transaction
24719
+ ------------------------------------------------------------------------------
24720
+ BootstrapFormTest: test_bootstrap_form_tag_allows_an_empty_name_for_checkboxes
24721
+ ------------------------------------------------------------------------------
24722
+  (0.0ms) rollback transaction
24723
+  (0.1ms) begin transaction
24724
+ --------------------------------------------------------------------------
24725
+ BootstrapFormTest: test_bootstrap_form_tag_does_not_clobber_custom_options
24726
+ --------------------------------------------------------------------------
24727
+  (0.0ms) rollback transaction
24728
+  (0.0ms) begin transaction
24729
+ ---------------------------------------------------------------------
24730
+ BootstrapFormTest: test_changing_the_class_name_for_the_alert_message
24731
+ ---------------------------------------------------------------------
24732
+  (0.0ms) rollback transaction
24733
+  (0.1ms) begin transaction
24734
+ ---------------------------------------------------------------
24735
+ BootstrapFormTest: test_custom_input_width_for_horizontal_forms
24736
+ ---------------------------------------------------------------
24737
+  (0.0ms) rollback transaction
24738
+  (0.0ms) begin transaction
24739
+ ---------------------------------------------------------------
24740
+ BootstrapFormTest: test_custom_label_width_for_horizontal_forms
24741
+ ---------------------------------------------------------------
24742
+  (0.0ms) rollback transaction
24743
+  (0.1ms) begin transaction
24744
+ -------------------------------------------
24745
+ BootstrapFormTest: test_default-style_forms
24746
+ -------------------------------------------
24747
+  (0.0ms) rollback transaction
24748
+  (0.1ms) begin transaction
24749
+ -------------------------------------------------------------------------
24750
+ BootstrapFormTest: test_error_summary_returns_an_unordered_list_of_errors
24751
+ -------------------------------------------------------------------------
24752
+  (0.1ms) rollback transaction
24753
+  (0.0ms) begin transaction
24754
+ ----------------------------------------------------------------------------------------------------------------------
24755
+ BootstrapFormTest: test_errors_display_correctly_and_inline_errors_are_turned_off_by_default_when_label_errors_is_true
24756
+ ----------------------------------------------------------------------------------------------------------------------
24757
+  (0.1ms) rollback transaction
24758
+  (0.0ms) begin transaction
24759
+ -----------------------------------------------------------------------------------------------------------
24760
+ BootstrapFormTest: test_errors_display_correctly_and_inline_errors_can_also_be_on_when_label_errors_is_true
24761
+ -----------------------------------------------------------------------------------------------------------
24762
+  (0.0ms) rollback transaction
24763
+  (0.0ms) begin transaction
24764
+ ----------------------------------------------------------------
24765
+ BootstrapFormTest: test_errors_on_hide_attribute_name_in_message
24766
+ ----------------------------------------------------------------
24767
+  (0.0ms) rollback transaction
24768
+  (0.0ms) begin transaction
24769
+ ------------------------------------------------------------------------------------------
24770
+ BootstrapFormTest: test_errors_on_renders_the_errors_for_a_specific_attribute_when_invalid
24771
+ ------------------------------------------------------------------------------------------
24772
+  (0.0ms) rollback transaction
24773
+  (0.0ms) begin transaction
24774
+ -------------------------------------------------------------------------------------
24775
+ BootstrapFormTest: test_existing_styles_aren't_clobbered_when_specifying_a_form_style
24776
+ -------------------------------------------------------------------------------------
24777
+  (0.0ms) rollback transaction
24778
+  (0.0ms) begin transaction
24779
+ --------------------------------------------------------------------------------------------
24780
+ BootstrapFormTest: test_given_role_attribute_should_not_be_covered_by_default_role_attribute
24781
+ --------------------------------------------------------------------------------------------
24782
+  (0.0ms) rollback transaction
24783
+  (0.0ms) begin transaction
24784
+ ---------------------------------------------------------------------------------------------------
24785
+ BootstrapFormTest: test_help_is_preserved_when_inline_errors:_false_is_passed_to_bootstrap_form_for
24786
+ ---------------------------------------------------------------------------------------------------
24787
+  (0.0ms) rollback transaction
24788
+  (0.0ms) begin transaction
24789
+ ----------------------------------------------
24790
+ BootstrapFormTest: test_horizontal-style_forms
24791
+ ----------------------------------------------
24792
+  (0.1ms) rollback transaction
24793
+  (0.0ms) begin transaction
24794
+ ------------------------------------------
24795
+ BootstrapFormTest: test_inline-style_forms
24796
+ ------------------------------------------
24797
+  (0.1ms) rollback transaction
24798
+  (0.1ms) begin transaction
24799
+ --------------------------------------------------------------------------
24800
+ BootstrapFormTest: test_label_error_messages_use_humanized_attribute_names
24801
+ --------------------------------------------------------------------------
24802
+  (0.0ms) rollback transaction
24803
+  (0.1ms) begin transaction
24804
+ -----------------------------------------------------------------------------------------------------
24805
+ BootstrapFormTest: test_offset_for_form_group_without_label_respects_label_width_for_horizontal_forms
24806
+ -----------------------------------------------------------------------------------------------------
24807
+  (0.0ms) rollback transaction
24808
+  (0.0ms) begin transaction
24809
+ --------------------------------------------------------------------------------------------------------------------------------
24810
+ BootstrapFormTest: test_the_field_contains_the_error_and_is_not_wrapped_in_div.field_with_errors_when_bootstrap_form_for_is_used
24811
+ --------------------------------------------------------------------------------------------------------------------------------
24812
+  (0.0ms) rollback transaction
24813
+  (0.0ms) begin transaction
24814
+ ---------------------------------------------------------------------------------------------
24815
+ BootstrapFormTest: test_the_field_is_wrapped_with_div.field_with_errors_when_form_for_is_used
24816
+ ---------------------------------------------------------------------------------------------
24817
+  (0.0ms) rollback transaction
24818
+  (0.0ms) begin transaction
24819
+ ------------------------------------------------------------------
24820
+ BootstrapOtherComponentsTest: test_override_primary_button_classes
24821
+ ------------------------------------------------------------------
24822
+  (0.0ms) rollback transaction
24823
+  (0.0ms) begin transaction
24824
+ -----------------------------------------------------------------
24825
+ BootstrapOtherComponentsTest: test_override_submit_button_classes
24826
+ -----------------------------------------------------------------
24827
+  (0.0ms) rollback transaction
24828
+  (0.0ms) begin transaction
24829
+ -------------------------------------------------------------------------
24830
+ BootstrapOtherComponentsTest: test_primary_button_uses_proper_css_classes
24831
+ -------------------------------------------------------------------------
24832
+  (0.0ms) rollback transaction
24833
+  (0.0ms) begin transaction
24834
+ -------------------------------------------------
24835
+ BootstrapOtherComponentsTest: test_static_control
24836
+ -------------------------------------------------
24837
+  (0.0ms) rollback transaction
24838
+  (0.0ms) begin transaction
24839
+ ------------------------------------------------------------------------
24840
+ BootstrapOtherComponentsTest: test_static_control_doesn't_require_a_name
24841
+ ------------------------------------------------------------------------
24842
+  (0.1ms) rollback transaction
24843
+  (0.0ms) begin transaction
24844
+ -------------------------------------------------------------------------------------
24845
+ BootstrapOtherComponentsTest: test_static_control_doesn't_require_an_actual_attribute
24846
+ -------------------------------------------------------------------------------------
24847
+  (0.0ms) rollback transaction
24848
+  (0.0ms) begin transaction
24849
+ ------------------------------------------------------------------------------
24850
+ BootstrapOtherComponentsTest: test_submit_button_defaults_to_rails_action_name
24851
+ ------------------------------------------------------------------------------
24852
+  (0.0ms) rollback transaction
24853
+  (0.0ms) begin transaction
24854
+ ----------------------------------------------------------------------------
24855
+ BootstrapOtherComponentsTest: test_submit_button_uses_default_button_classes
24856
+ ----------------------------------------------------------------------------
24857
+  (0.0ms) rollback transaction
24858
+  (0.0ms) begin transaction
24859
+ ---------------------------------------------------------------------------------------
24860
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_inline_radios_correctly
24861
+ ---------------------------------------------------------------------------------------
24862
+  (0.1ms) rollback transaction
24863
+  (0.0ms) begin transaction
24864
+ -----------------------------------------------------------------------------------------------
24865
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_label_defined_by_Proc_correctly
24866
+ -----------------------------------------------------------------------------------------------
24867
+  (0.0ms) rollback transaction
24868
+  (0.0ms) begin transaction
24869
+ -------------------------------------------------------------------------------------------------
24870
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_label_defined_by_lambda_correctly
24871
+ -------------------------------------------------------------------------------------------------
24872
+  (0.0ms) rollback transaction
24873
+  (0.0ms) begin transaction
24874
+ -----------------------------------------------------------------------------------------
24875
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_multiple_radios_correctly
24876
+ -----------------------------------------------------------------------------------------
24877
+  (0.0ms) rollback transaction
24878
+  (0.0ms) begin transaction
24879
+ --------------------------------------------------------------------------------------------------------------------
24880
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_multiple_radios_with_label_defined_by_Proc_correctly
24881
+ --------------------------------------------------------------------------------------------------------------------
24882
+  (0.0ms) rollback transaction
24883
+  (0.0ms) begin transaction
24884
+ ----------------------------------------------------------------------------------------------------------------------
24885
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_multiple_radios_with_label_defined_by_lambda_correctly
24886
+ ----------------------------------------------------------------------------------------------------------------------
24887
+  (0.0ms) rollback transaction
24888
+  (0.0ms) begin transaction
24889
+ --------------------------------------------------------------------------------------------------------------------
24890
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_multiple_radios_with_value_defined_by_Proc_correctly
24891
+ --------------------------------------------------------------------------------------------------------------------
24892
+  (0.0ms) rollback transaction
24893
+  (0.1ms) begin transaction
24894
+ ----------------------------------------------------------------------------------------------------------------------
24895
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_multiple_radios_with_value_defined_by_lambda_correctly
24896
+ ----------------------------------------------------------------------------------------------------------------------
24897
+  (0.1ms) rollback transaction
24898
+  (0.1ms) begin transaction
24899
+ ----------------------------------------------------------------------------------------
24900
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_the_form_group_correctly
24901
+ ----------------------------------------------------------------------------------------
24902
+  (0.0ms) rollback transaction
24903
+  (0.1ms) begin transaction
24904
+ -----------------------------------------------------------------------------------------------
24905
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_value_defined_by_Proc_correctly
24906
+ -----------------------------------------------------------------------------------------------
24907
+  (0.0ms) rollback transaction
24908
+  (0.1ms) begin transaction
24909
+ -------------------------------------------------------------------------------------------------
24910
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_value_defined_by_lambda_correctly
24911
+ -------------------------------------------------------------------------------------------------
24912
+  (0.0ms) rollback transaction
24913
+  (0.0ms) begin transaction
24914
+ ---------------------------------------------------------------------------------------------
24915
+ BootstrapRadioButtonTest: test_collection_radio_buttons_renders_with_checked_option_correctly
24916
+ ---------------------------------------------------------------------------------------------
24917
+  (0.0ms) rollback transaction
24918
+  (0.0ms) begin transaction
24919
+ ----------------------------------------------------------------------------------
24920
+ BootstrapRadioButtonTest: test_radio_button_disabled_inline_label_is_set_correctly
24921
+ ----------------------------------------------------------------------------------
24922
+  (0.1ms) rollback transaction
24923
+  (0.1ms) begin transaction
24924
+ ---------------------------------------------------------------------------
24925
+ BootstrapRadioButtonTest: test_radio_button_disabled_label_is_set_correctly
24926
+ ---------------------------------------------------------------------------
24927
+  (0.0ms) rollback transaction
24928
+  (0.0ms) begin transaction
24929
+ -------------------------------------------------------------------------------
24930
+ BootstrapRadioButtonTest: test_radio_button_inline_label_class_is_set_correctly
24931
+ -------------------------------------------------------------------------------
24932
+  (0.0ms) rollback transaction
24933
+  (0.0ms) begin transaction
24934
+ -------------------------------------------------------------------------
24935
+ BootstrapRadioButtonTest: test_radio_button_inline_label_is_set_correctly
24936
+ -------------------------------------------------------------------------
24937
+  (0.0ms) rollback transaction
24938
+  (0.0ms) begin transaction
24939
+ ----------------------------------------------------------------
24940
+ BootstrapRadioButtonTest: test_radio_button_is_wrapped_correctly
24941
+ ----------------------------------------------------------------
24942
+  (0.0ms) rollback transaction
24943
+  (0.0ms) begin transaction
24944
+ ------------------------------------------------------------------------
24945
+ BootstrapRadioButtonTest: test_radio_button_label_class_is_set_correctly
24946
+ ------------------------------------------------------------------------
24947
+  (0.0ms) rollback transaction
24948
+  (0.0ms) begin transaction
24949
+ ---------------------------------------------------------------------------
24950
+ BootstrapSelectsTest: test_bootstrap_specific_options_are_handled_correctly
24951
+ ---------------------------------------------------------------------------
24952
+  (0.0ms) rollback transaction
24953
+  (0.0ms) begin transaction
24954
+ -------------------------------------------------------------------
24955
+ BootstrapSelectsTest: test_collection_selects_are_wrapped_correctly
24956
+ -------------------------------------------------------------------
24957
+  (0.1ms) rollback transaction
24958
+  (0.0ms) begin transaction
24959
+ -------------------------------------------------------------------------------------------------
24960
+ BootstrapSelectsTest: test_collection_selects_with_options_and_html_options_are_wrapped_correctly
24961
+ -------------------------------------------------------------------------------------------------
24962
+  (0.0ms) rollback transaction
24963
+  (0.0ms) begin transaction
24964
+ --------------------------------------------------------------------------------
24965
+ BootstrapSelectsTest: test_collection_selects_with_options_are_wrapped_correctly
24966
+ --------------------------------------------------------------------------------
24967
+  (0.0ms) rollback transaction
24968
+  (0.0ms) begin transaction
24969
+ -------------------------------------------------------------
24970
+ BootstrapSelectsTest: test_date_selects_are_wrapped_correctly
24971
+ -------------------------------------------------------------
24972
+  (0.1ms) rollback transaction
24973
+  (0.0ms) begin transaction
24974
+ -------------------------------------------------------------------------------------------
24975
+ BootstrapSelectsTest: test_date_selects_with_options_and_html_options_are_wrapped_correctly
24976
+ -------------------------------------------------------------------------------------------
24977
+  (0.0ms) rollback transaction
24978
+  (0.0ms) begin transaction
24979
+ --------------------------------------------------------------------------
24980
+ BootstrapSelectsTest: test_date_selects_with_options_are_wrapped_correctly
24981
+ --------------------------------------------------------------------------
24982
+  (0.1ms) rollback transaction
24983
+  (0.0ms) begin transaction
24984
+ -----------------------------------------------------------------
24985
+ BootstrapSelectsTest: test_datetime_selects_are_wrapped_correctly
24986
+ -----------------------------------------------------------------
24987
+  (0.0ms) rollback transaction
24988
+  (0.0ms) begin transaction
24989
+ -----------------------------------------------------------------------------------------------
24990
+ BootstrapSelectsTest: test_datetime_selects_with_options_and_html_options_are_wrapped_correctly
24991
+ -----------------------------------------------------------------------------------------------
24992
+  (0.0ms) rollback transaction
24993
+  (0.0ms) begin transaction
24994
+ ------------------------------------------------------------------------------
24995
+ BootstrapSelectsTest: test_datetime_selects_with_options_are_wrapped_correctly
24996
+ ------------------------------------------------------------------------------
24997
+  (0.0ms) rollback transaction
24998
+  (0.0ms) begin transaction
24999
+ ---------------------------------------------------------------------------
25000
+ BootstrapSelectsTest: test_grouped_collection_selects_are_wrapped_correctly
25001
+ ---------------------------------------------------------------------------
25002
+  (0.1ms) rollback transaction
25003
+  (0.0ms) begin transaction
25004
+ ---------------------------------------------------------------------------------------------------------
25005
+ BootstrapSelectsTest: test_grouped_collection_selects_with_options_and_html_options_are_wrapped_correctly
25006
+ ---------------------------------------------------------------------------------------------------------
25007
+  (0.1ms) rollback transaction
25008
+  (0.0ms) begin transaction
25009
+ ----------------------------------------------------------------------------------------
25010
+ BootstrapSelectsTest: test_grouped_collection_selects_with_options_are_wrapped_correctly
25011
+ ----------------------------------------------------------------------------------------
25012
+  (0.0ms) rollback transaction
25013
+  (0.0ms) begin transaction
25014
+ --------------------------------------------------------
25015
+ BootstrapSelectsTest: test_selects_are_wrapped_correctly
25016
+ --------------------------------------------------------
25017
+  (0.0ms) rollback transaction
25018
+  (0.0ms) begin transaction
25019
+ ---------------------------------------------------------
25020
+ BootstrapSelectsTest: test_selects_render_labels_properly
25021
+ ---------------------------------------------------------
25022
+  (0.0ms) rollback transaction
25023
+  (0.0ms) begin transaction
25024
+ -------------------------------------------------------------------------------------------
25025
+ BootstrapSelectsTest: test_selects_with_both_options_and_html_options_are_wrapped_correctly
25026
+ -------------------------------------------------------------------------------------------
25027
+  (0.0ms) rollback transaction
25028
+  (0.0ms) begin transaction
25029
+ ---------------------------------------------------------------------
25030
+ BootstrapSelectsTest: test_selects_with_options_are_wrapped_correctly
25031
+ ---------------------------------------------------------------------
25032
+  (0.0ms) rollback transaction
25033
+  (0.0ms) begin transaction
25034
+ -------------------------------------------------------------
25035
+ BootstrapSelectsTest: test_time_selects_are_wrapped_correctly
25036
+ -------------------------------------------------------------
25037
+  (0.0ms) rollback transaction
25038
+  (0.0ms) begin transaction
25039
+ -------------------------------------------------------------------------------------------
25040
+ BootstrapSelectsTest: test_time_selects_with_options_and_html_options_are_wrapped_correctly
25041
+ -------------------------------------------------------------------------------------------
25042
+  (0.0ms) rollback transaction
25043
+  (0.0ms) begin transaction
25044
+ --------------------------------------------------------------------------
25045
+ BootstrapSelectsTest: test_time_selects_with_options_are_wrapped_correctly
25046
+ --------------------------------------------------------------------------
25047
+  (0.0ms) rollback transaction
25048
+  (0.0ms) begin transaction
25049
+ ------------------------------------------------------------------
25050
+ BootstrapSelectsTest: test_time_zone_selects_are_wrapped_correctly
25051
+ ------------------------------------------------------------------
25052
+  (0.1ms) rollback transaction
25053
+  (0.0ms) begin transaction
25054
+ --------------------------------------------------------------------------------
25055
+ SpecialFormClassModelsTest: test_Anonymous_models_are_supported_for_form_builder
25056
+ --------------------------------------------------------------------------------
25057
+  (0.0ms) rollback transaction
25058
+  (0.0ms) begin transaction
25059
+ --------------------------------------------------------------------------
25060
+ SpecialFormClassModelsTest: test_Nil_models_are_supported_for_form_builder
25061
+ --------------------------------------------------------------------------
25062
+  (0.0ms) rollback transaction
25063
+  (0.0ms) begin transaction
25064
+ -------------------------------------------------------------------------------------------
25065
+ SpecialFormClassModelsTest: test_Objects_without_model_names_are_supported_for_form_builder
25066
+ -------------------------------------------------------------------------------------------
25067
+  (0.0ms) rollback transaction
@@ -18,7 +18,6 @@ class SpecialFormClassModelsTest < ActionView::TestCase
18
18
  assert_equal expected, @builder.date_field(:misc)
19
19
  end
20
20
 
21
-
22
21
  test "Nil models are supported for form builder" do
23
22
  @user = nil
24
23
  @builder = BootstrapForm::FormBuilder.new(:user, @user, self, {})
@@ -29,4 +28,16 @@ class SpecialFormClassModelsTest < ActionView::TestCase
29
28
  assert_equal expected, @builder.date_field(:misc)
30
29
  end
31
30
 
32
- end
31
+ test "Objects without model names are supported for form builder" do
32
+ user_klass = FauxUser
33
+
34
+ @user = user_klass.new(email: 'steve@example.com', password: 'secret', comments: 'my comment')
35
+ @builder = BootstrapForm::FormBuilder.new(:user, @user, self, {})
36
+ @horizontal_builder = BootstrapForm::FormBuilder.new(:user, @user, self, {layout: :horizontal, label_col: "col-sm-2", control_col: "col-sm-10"})
37
+ I18n.backend.store_translations(:en, {activerecord: {help: {faux_user: {password: "A good password should be at least six characters long"}}}})
38
+
39
+ expected = %{<div class="form-group"><label class="control-label" for="user_misc">Misc</label><input class="form-control" id="user_misc" name="user[misc]" type="date" /></div>}
40
+ assert_equal expected, @builder.date_field(:misc)
41
+ end
42
+
43
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Potenza
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-23 00:00:00.000000000 Z
12
+ date: 2016-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mime-types
@@ -117,6 +117,7 @@ files:
117
117
  - test/dummy/app/controllers/application_controller.rb
118
118
  - test/dummy/app/helpers/application_helper.rb
119
119
  - test/dummy/app/models/address.rb
120
+ - test/dummy/app/models/faux_user.rb
120
121
  - test/dummy/app/models/super_user.rb
121
122
  - test/dummy/app/models/user.rb
122
123
  - test/dummy/app/views/layouts/application.html.erb
@@ -180,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
181
  version: '0'
181
182
  requirements: []
182
183
  rubyforge_project:
183
- rubygems_version: 2.6.6
184
+ rubygems_version: 2.6.7
184
185
  signing_key:
185
186
  specification_version: 4
186
187
  summary: Rails form builder that makes it easy to style forms using Twitter Bootstrap
@@ -198,6 +199,7 @@ test_files:
198
199
  - test/dummy/app/controllers/application_controller.rb
199
200
  - test/dummy/app/helpers/application_helper.rb
200
201
  - test/dummy/app/models/address.rb
202
+ - test/dummy/app/models/faux_user.rb
201
203
  - test/dummy/app/models/super_user.rb
202
204
  - test/dummy/app/models/user.rb
203
205
  - test/dummy/app/views/layouts/application.html.erb