Test fails #24

Closed
voxik opened this Issue Oct 17, 2012 · 2 comments

2 participants

@voxik

Hi, I observe following test failure:

$ sed -i -e 's|require '\''bundler/setup'\''||' spec/spec_helper.rb
$ rspec spec
DEPRECATION WARNING: Calling set_primary_key is deprecated. Please use `self.primary_key = 'the_name'` instead. (called from <class:Story> at /builddir/build/BUILD/rubygem-delayed_job_active_record-0.3.3/usr/share/gems/gems/delayed_job_active_record-0.3.3/spec/spec_helper.rb:43)
..........................................................F....................
Failures:
  1) Delayed::Backend::ActiveRecord::Job it should behave like a delayed_job backend worker integration failed jobs should re-schedule jobs after failing
     Failure/Error: @job.attempts.should == 1
       expected: 1
            got: 2 (using ==)
     Shared Example Group: "a delayed_job backend" called from ./spec/delayed/backend/active_record_spec.rb:9
     # /usr/share/gems/gems/rspec-expectations-2.11.3/lib/rspec/expectations/fail_with.rb:33:in `fail_with'
     # /usr/share/gems/gems/rspec-expectations-2.11.3/lib/rspec/matchers/operator_matcher.rb:47:in `fail_with_message'
     # /usr/share/gems/gems/rspec-expectations-2.11.3/lib/rspec/matchers/operator_matcher.rb:69:in `__delegate_operator'
     # /usr/share/gems/gems/rspec-expectations-2.11.3/lib/rspec/matchers/operator_matcher.rb:59:in `eval_match'
     # /usr/share/gems/gems/rspec-expectations-2.11.3/lib/rspec/matchers/operator_matcher.rb:28:in `block in use_custom_matcher_or_delegate'
     # /usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/backend/shared_spec.rb:491:in `block (4 levels) in <top (required)>'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in `instance_eval'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in `block in run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:253:in `with_around_each_hooks'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:110:in `run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:378:in `block in run_examples'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `map'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `run_examples'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:360:in `run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `block in run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `map'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `block in run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `map'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `block in run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `map'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `map'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `block in run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb:34:in `report'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:25:in `run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
     # /usr/share/gems/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
Finished in 1.93 seconds
79 examples, 1 failure
Failed examples:
rspec /usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/backend/shared_spec.rb:486 # Delayed::Backend::ActiveRecord::Job it should behave like a delayed_job backend worker integration failed jobs should re-schedule jobs after failing

These are the gems I am using for testing:

$ gem list

*** LOCAL GEMS ***

activemodel (3.2.8)
activerecord (3.2.8)
activesupport (3.2.8)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.1.4)
delayed_job (3.0.2)
diff-lcs (1.1.3)
i18n (0.6.0)
io-console (0.3)
json (1.6.5)
multi_json (1.3.6)
rake (0.9.2.2)
rdoc (3.12)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.3)
rspec-mocks (2.11.3)
sqlite3 (1.3.5)
tzinfo (0.3.30)
@voxik

Please note that the test suite used to work. At that time, I was running it against Rails 3.0, so it seems that Rails 3.2 might be the issue?

@sferik

This should be working now. Please reopen this issue if you're still experiencing this test failure.

@sferik sferik closed this Apr 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment