Sha256: 0d93c1173486995a5ec3cb0416e308b0b5b954f764eb7500f0430bafaa5bfd3b
Contents?: true
Size: 667 Bytes
Versions: 4
Compression:
Stored size: 667 Bytes
Contents
require 'spec_helper' describe EPUBInfo::Models::Date do describe '#initialize' do subject { EPUBInfo::Models::Date.new(Nokogiri::XML(File.new('spec/support/xml/metamorphosis_metadata_epub2.opf')).css('metadata').xpath('.//dc:date').first) } its(:time) { should == Time.parse('2005-08-17') } its(:event) { should == 'publication' } end describe '#to_hash' do context 'keys' do subject { EPUBInfo::Models::Date.new(Nokogiri::XML(File.new('spec/support/xml/metamorphosis_metadata_epub2.opf')).css('metadata').xpath('.//dc:date').first).to_hash.keys } it { should include :time } it { should include :event } end end end
Version data entries
4 entries across 4 versions & 1 rubygems