How to test exception raising in Rails/RSpec?

前端 未结 3 1753
梦毁少年i
梦毁少年i 2020-12-08 18:10

There is the following code:

def index
    @car_types = car_brand.car_types
end

def car_brand
    CarBrand.find(params[:car_brand_id])
    rescue ActiveReco         


        
3条回答
提交回复
热议问题