Skip to content

Commit e1d1368

Browse files
committed
More obvious spec definition
1 parent 0dd8867 commit e1d1368

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec/examples/_no_active_support_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ module IceCube
2121

2222
it 'should be able to calculate beginning of dates without active_support' do
2323
date = Date.new(2011, 1, 1)
24-
res = [ TimeUtil.beginning_of_date(date), Time.local(2011, 1, 1, 0, 0, 0) ]
25-
res.all? { |r| r.class.name == 'Time' }
26-
expect(res.map(&:to_s).uniq.size).to eq(1)
24+
midnight = TimeUtil.beginning_of_date(date)
25+
26+
expect(midnight).to eq(Time.local(2011, 1, 1, 0, 0, 0))
27+
expect(midnight).to be_a Time
2728
end
2829

2930
it 'should serialize to hash without error' do

0 commit comments

Comments
 (0)