Sha256: 21b60f225faa47f25bf5ca6557ac0cdeb6626afcae4af2ef44bba506a140c46d
Contents?: true
Size: 984 Bytes
Versions: 6
Compression:
Stored size: 984 Bytes
Contents
require 'spec_helper' module Curate describe ContentVersion do let(:content) { double } let(:created_on) { Time.now } let(:version_id) { 'content.1'} let(:committer_name) { 'darryl' } let(:raw_version) { double(dsCreateDate: created_on, versionID: version_id) } subject { described_class.new(content, raw_version) } before(:each) do content.stub(:version_committer).with(raw_version).and_return(committer_name) end its(:created_on) { should eq(created_on) } its(:committer_name) { should eq(committer_name) } its(:version_id) { should eq version_id } its(:formatted_created_on) { should eq created_on.localtime.to_formatted_s(:long_ordinal)} end describe ContentVersion::Null do subject { described_class.new(double)} its(:created_on) { should eq 'unknown'} its(:committer_name) { should eq 'unknown'} its(:version_id) { should eq 'unknown'} its(:formatted_created_on) { should eq 'unknown'} end end
Version data entries
6 entries across 6 versions & 1 rubygems