Sha256: 519bc8578dc5263ea250e8463ae6c1cea7df3c1d5105a360e2b09ea5c2fef754
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
# # File 'filehelper_spec.rb' created on 28 feb 2008 at 16:44:07. # See 'dokkit.rb' or +LICENSE+ for licence information. # # (c)2008 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors). # # To execute this spec run: # # spec spec/filehelper_spec.rb # $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__),'../lib'))) require 'rubygems' require 'spec' require 'dokkit' require 'dokkit/extension/filehelper' require File.dirname(__FILE__) + '/spec_helper.rb' describe Dokkit::Extension::FileHelper do before do @document = mock('document') @document.extend Dokkit::Extension::FileHelper end it 'should resolve the absolute path name' do @taskconfig = mock('taskconfig') @taskconfig.should_receive(:document_dir).and_return('doc/pages') @document.should_receive(:taskconfig).and_return(@taskconfig) @document.should_receive(:document).and_return('doc/pages/subdir/document.ext') @document.relative('/images/image.img').should == '../images/image.img' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dokkit-0.3.0 | spec/filehelper_spec.rb |