0
爲什麼我無法訪問實例變量?rspec --innit;在.bash_profile中不起作用
let(:hotel2) { Hotel.new name: 'Premier Inn', rating: 1,
city: 'Leeds', total_rooms: 15, features: [] }
我在初始化時調用它,但它一直拋出一個不正確的參數錯誤。
def initialize()
@name = name
@rating = rating
@city = city
@total_rooms = total_rooms
@features = features
end
任何想法?