2013-02-19 59 views
0

後,我安裝will_paginate-bootstrap寶石,並將其添加到我的模板Rspec的測試失敗will_paginate的自舉寶石

<%= will_paginate, renderer: BootstrapPagination::Rails %> 

,現在我的測試失敗

Failure/Error: visit users_path 
    ActionView::Template::Error: 
     /Users/user/dev/rails/my/app_rails/app/views/users/index.html.erb:10: syntax error, unexpected tLABEL, expecting '=' 
     ...end= (will_paginate, renderer: BootstrapPagination::Rails)... 
     ...        ^
    # <internal:prelude>:10:in `synchronize' 
    # ./spec/requests/user_pages_spec.rb:24:in `block (4 levels) in <top (required)>' 

是什麼消息呢?我怎樣才能修復破碎的測試?

回答

0

該代碼使用Ruby 1.9哈希語法。偶爾你還在1.8?

+0

沒了,1.9.3通過RVM(寫在同一風格的其它代碼)安裝 – asdf 2013-02-19 12:16:22

0

括號固定問題<%= will_paginate(:renderer => BootstrapPagination::Rails) %>

+0

只刪除逗號應該工作。 – 2013-02-19 15:46:15