Skip to content

Commit a887fcc

Browse files
committed
Actually, this isn't a Rails version issue. This commit improves the explanation
1 parent 4453e8f commit a887fcc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spec/inertia/conditional_sharing_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919

2020
context "when there is conditional data shared via before_action" do
2121
it "raises an error because it is frozen" do
22-
# Rails < 7.1 won't raise the error unless we load the controller before the request we actually want to test.
23-
#
24-
# This can be removed when we drop support for Rails < 7.1.
25-
get conditional_share_show_path, headers: {'X-Inertia' => true}
22+
# InertiaSharedData isn't frozen until after the first time it's accessed.
23+
InertiaConditionalSharingController.send(:_inertia_shared_data)
2624

2725
expect {
2826
get conditional_share_show_with_a_problem_path, headers: {'X-Inertia' => true}

0 commit comments

Comments
 (0)