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
任何想法?
哦,我爱上莎士比亚。谢谢!! –