1
我想測試我的布爾字符串的方法之一,但我得到了波紋管錯誤:Rspec的和Rails的:未定義的方法`到」真正:TrueClass
undefined method `to' for true:TrueClass
describe 'is_tall?' do
it "should return true for a tall user" do
expect(tall_user_string.is_tall?.to be_truthy)
end
it "should return false for a short user" do
expect(user_string.is_tall?.to be_falsey)
end
end
任何想法?
哦,我愛上莎士比亞。謝謝!! –