Comments (3)
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.
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.
Excellent! That fixes it for me.
from by_star.
Related Issues (20)
- Release of v2.2.2 or v3.0.0 HOT 3
- Next_week does not work HOT 1
- Remove miliseconds on sql generated HOT 2
- Scope Offsets Issues
- Any way to simulate by_days HOT 1
- Between the same DateTime behavior HOT 4
- Support by_hour, by_minute, and other times HOT 3
- by_star_field with :scope doesn't work properly for class methods (ex. newest) HOT 5
- between_times( nil, Time.now) fails when column contains nil HOT 1
- Before should handle `nil` column value HOT 1
- How to query between two fields? HOT 2
- Best practice for frontend HOT 1
- before(nil) and after(nil) HOT 2
- between_dates(nil, nil) or between_times(nil, nil) clears method chaining. HOT 4
- undefined method `at_time` HOT 1
- not_by_year: negate inclusion in range
- Upgrading to 4.0.1
- Methods like by_week and by_month don't work on fields of Date type?
- Regression on datetime fields with sub-second precision?
- config.filter_parameters keys ignored HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from by_star.