Could you not just `expect(item.category).to eq category` and avoid the need to stub the `name` method?