Sha256: 9b0945b31224b78fbaa5844dac89e95b08766771413b0872cb95c89625f81d81
Contents?: true
Size: 545 Bytes
Versions: 11
Compression:
Stored size: 545 Bytes
Contents
require 'spec_helper' module Alchemy describe EssenceFile do describe '#preview_text' do let(:attachment) { mock_model(Attachment, name: 'File') } let(:essence) { EssenceFile.new } it "returns the attachment's name as preview text" do essence.stub(:attachment).and_return(attachment) essence.preview_text.should == 'File' end context "with no attachment assigned" do it "returns empty string" do essence.preview_text.should == '' end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems