rspec - 添加帮助模块?

时间:2011-03-19 01:55:45

标签: ruby-on-rails ruby-on-rails-3 rspec delayed-job

我在这里关注这个例子:http://erikonrails.snowedin.net/?p=230

我补充说:

lib/delayed_job_spec_helper.rb

然后在我的rspec中我有:

describe Thingy do
  include DelayedJobSpecHelper

  it "should have been worked on if I do something that queues jobs" do
    thing = Thingy.new
    thing.method_that_queues_jobs
    work_off
    thing.should be_worked_on
  end
end

问题是我收到错误:

/Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing': uninitialized constant DelayedJobSpecHelper (NameError)

想法?感谢

1 个答案:

答案 0 :(得分:0)

请检查此讨论,它可能与您的问题有关。

http://www.mail-archive.com/thinking-sphinx@googlegroups.com/msg05036.html