Fix(specs): Initialize @version_members in crops/show view spec

The `crops/show` view spec was failing with a `NoMethodError` because
the `@version_members` instance variable was `nil`. This variable is used
in the `_history` partial, which is rendered by the `show` view.

This commit fixes the spec by initializing `@version_members` to an
empty hash in the `before` block of the spec. This ensures that the
view can render without errors during the test run.
This commit is contained in:
google-labs-jules[bot]
2025-12-01 02:34:46 +00:00
parent 3ba3c0077f
commit 6f0d0afdb8

View File

@@ -12,6 +12,7 @@ describe "crops/show" do
@current_member = @member
@harvest = FactoryBot.create(:harvest, owner: @member)
controller.stub(:current_user) { @member }
assign(:version_members, {})
end
it "hides sunniness block if no sunniness" do