Coder Social home page Coder Social logo

Test suite: 1 failure about by_star HOT 3 CLOSED

davegudge avatar davegudge commented on September 28, 2024
Test suite: 1 failure

from by_star.

Comments (3)

radar avatar radar commented on September 28, 2024

I am also seeing this test failing on my machine.

  1) Time fortnight middle of year beginning_of_fortnight should eq 2014-06-04 00:00:00 +1000
     Failure/Error: its(:beginning_of_fortnight){ should eq Time.parse('2014-06-04') }

       expected: 2014-06-04 00:00:00 +1000
            got: 2014-06-03 23:00:00 +1000

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -2014-06-04 00:00:00 +1000
       +2014-06-03 23:00:00 +1000
     # ./spec/unit/kernel_time_spec.rb:32:in `block (4 levels) in <top (required)>'

  2) Time fortnight middle of year end_of_fortnight should eq 2014-06-17 23:59:59 +1000
     Failure/Error: its(:end_of_fortnight){ should eq Time.parse('2014-06-17').end_of_day }

       expected: 2014-06-17 23:59:59 +1000
            got: 2014-06-16 23:59:59 +1000

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -2014-06-17 23:59:59 +1000
       +2014-06-16 23:59:59 +1000
     # ./spec/unit/kernel_time_spec.rb:33:in `block (4 levels) in <top (required)>'

Regarding the mongoid specs, all you need is a MongoDB server running in the background. I've installed mine on my machine using brew install mongodb and I run it using mongod in another window, closing that window when I don't need it.

@johnnyshields Since you're now the resident expert at this, how can we debug what's going on here?

from by_star.

johnnyshields avatar johnnyshields commented on September 28, 2024

Firstly, this unit test is in the "unit" folder which means it is not dependent on either Mongoid or ActiveRecord.

This looks like it may be DST related. I've pushed a fix here: d06a2b4

from by_star.

radar avatar radar commented on September 28, 2024

Excellent! That fixes it for me.

from by_star.

Related Issues (20)

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.