breadcrumbs_on_rails与rspec控制器规格

时间:2015-12-08 14:36:22

标签: ruby-on-rails rspec breadcrumbs

我开始使用breadcrumbsonrails,它在生产中运作良好。在测试我的控制器规格失败,我想知道为什么。

控制器示例:

Unable to find static main(String[]) in 'HelloWorld'
java.lang.VerifyError: Verifier rejected class HelloWorld due to bad method void HelloWorld.main(java.lang.String[]) (declaration of 'HelloW
orld' appears in /storage/extSdCard/HelloWorld.zip)

rspec的stacktrace:

class AdvertisementsController < ApplicationController
  layout 'mainapp'

  before_action :advertiser?
  before_action :new_add?

  add_breadcrumb 'Gallery', :gallery_index_path
  add_breadcrumb 'Post', :post_advertisements_path

  def new
    ...
    add_breadcrumb 'New', :new_post_advertisement_path
  end

0 个答案:

没有答案