Sha256: 25e9d3b77ba2498724fe60c75bbdd89c9a6ba510888003d3512aacf8f4e6f21b
Contents?: true
Size: 689 Bytes
Versions: 18
Compression:
Stored size: 689 Bytes
Contents
require 'spec_helper' module Alchemy describe EssenceDate do let(:essence) { EssenceDate.new } it_behaves_like "an essence" do let(:essence) { EssenceDate.new } let(:ingredient_value) { DateTime.now } end describe '#preview_text' do context "if no date set" do it "should return an empty string" do expect(essence.preview_text).to eq("") end end context "if date set" do it "should format the date by i18n" do essence.date = DateTime.now expect(::I18n).to receive(:l).with(essence.date, format: :date) essence.preview_text end end end end end
Version data entries
18 entries across 18 versions & 2 rubygems