I have one subject block that I want to reuse in various places.
subject(:stubbed_data) do
expect(response.body).to eq(dynamic_var)
end
The dynamic_var
variable will be different for different test cases. Is there any way to call subbed_data
subject with arguments so that I can have dynamic value for dynamic_var
variable?