Sha256: ae2b5d0338b0cb7cd82dbd22fce60a50ec66e5fe18fac86acbad5a0e3be57693

Contents?: true

Size: 521 Bytes

Versions: 2

Compression:

Stored size: 521 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe TriviaCrack::Parsers::TimeParser do
  describe '.parse' do
    subject { TriviaCrack::Parsers::TimeParser.parse raw_data }

    let(:raw_data) { '02/18/2015 00:11:33 EST' }

    it { is_expected.to be_a Time }
    its(:day) { is_expected.to be 18 }
    its(:month) { is_expected.to be 2 }
    its(:year) { is_expected.to be 2015 }
    its(:hour) { is_expected.to be 0 }
    its(:min) { is_expected.to be 11 }
    its(:sec) { is_expected.to be 33 }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
triviacrack-0.8.0 spec/parsers/time_parser_spec.rb
triviacrack-0.7.0 spec/parsers/time_parser_spec.rb