Skip to content

Commit 16d3eba

Browse files
committed
Tests work regardless of defaults in demo app
1 parent 15348f2 commit 16d3eba

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

test/bootstrap_collection_checkboxes_test.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,14 @@ class BootstrapCollectionCheckboxesTest < ActionView::TestCase
440440
class BootstrapLegacyCollectionCheckboxesTest < ActionView::TestCase
441441
include BootstrapForm::ActionViewExtensions::FormHelper
442442

443-
setup :setup_test_fixture
443+
setup do
444+
setup_test_fixture
445+
Rails.application.config.bootstrap_form.group_around_collections = false
446+
end
447+
448+
teardown do
449+
Rails.application.config.bootstrap_form.group_around_collections = true
450+
end
444451

445452
test "collection_check_boxes renders the form_group correctly" do
446453
collection = [Address.new(id: 1, street: "Foobar")]

test/bootstrap_collection_radio_buttons_test.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,14 @@ class BootstrapCollectionRadioButtonsTest < ActionView::TestCase
271271
class BootstrapCLegacyollectionRadioButtonsTest < ActionView::TestCase
272272
include BootstrapForm::ActionViewExtensions::FormHelper
273273

274-
setup :setup_test_fixture
274+
setup do
275+
setup_test_fixture
276+
Rails.application.config.bootstrap_form.group_around_collections = false
277+
end
278+
279+
teardown do
280+
Rails.application.config.bootstrap_form.group_around_collections = true
281+
end
275282

276283
test "collection_radio_buttons renders the form_group correctly" do
277284
collection = [Address.new(id: 1, street: "Foobar")]

0 commit comments

Comments
 (0)