Giter VIP home page Giter VIP logo

Comments (3)

MGerrior avatar MGerrior commented on August 10, 2024

Hey @why-el , thanks for opening this issue. Would you please be able to provide an example spec that is failing for you so that I could debug this further? I'm using the gem for the following test case and have passing tests:

# config/schedule.rb
every 1.day, at: '3:06 am' do
  rake 'locations:sweep'
end

# spec/whenever_spec.rb
describe Whenever do
  include Shoulda::Whenever

  let(:whenever) { Whenever::JobList.new(file: Rails.root.join("config", "schedule.rb").to_s) }

  it "schedules the locations sweep" do
    expect(whenever).to schedule_rake("locations:sweep").every(1.day).at("3:06 am")
  end
end

I haven't been particularly active in updating the gem, so perhaps a newer version of rspec/whenever/rails is causing an issue?

from shoulda-whenever.

why-el avatar why-el commented on August 10, 2024

Hey @MGerrior, thanks for the quick response. I tried it again with the same example you provided, it failed for me. Here is a screenshot.

screen shot 2017-01-03 at 12 12 02 pm

The 86400 is not a key in the jobs hash, so filtering is invalidated.

Here is everything Rails, Rspec and whenever related in my gem:

screen shot 2017-01-03 at 12 14 45 pm

from shoulda-whenever.

MGerrior avatar MGerrior commented on August 10, 2024

Thanks for providing that list. It looks like we have quite a few discrepancies, the project I originally built this gem for is still using Rails 4, along with whenever 0.9.4 and rspec 3.2.0. Looks like it may be related to this commit introduced in the 0.9.5 version of the whenever (when using Ruby 2.3).

I'll see if I can get a fix working this week for newer versions of whenever, though feel free to open a PR if you beat me to it.

from shoulda-whenever.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.