Use `allow()` syntax: `allow(view).to receive(:blacklight_config).and_return(blacklight_config)`