def piyo User.displayable.exists? ? "うぇい" : "ウオオン" end
describe "#piyo" do before do User.stub_chain(:displayable, :exists?).and_return true end it do expect(piyo).to eq "うぇい" end end
なるほど
def piyo User.displayable.exists? ? "うぇい" : "ウオオン" end
describe "#piyo" do before do User.stub_chain(:displayable, :exists?).and_return true end it do expect(piyo).to eq "うぇい" end end
なるほど