Sha256: a94c10d3b974993732bad2abcf039b9685d592e1b2fac6e2e2e320e4ca86c913
Contents?: true
Size: 693 Bytes
Versions: 8
Compression:
Stored size: 693 Bytes
Contents
require File.expand_path('../../spec_helper', __FILE__) describe 'XCRes::FileHelper' do def subject Class.new.class_eval { include XCRes::FileHelper }.new end describe '#basename_without_ext' do it 'should raise if the name is not given' do -> { subject.basename_without_ext(nil) }.should.raise?(TypeError) end it 'should return the name itself if there is not extension' do subject.basename_without_ext('dir/base').should.be.eql?('base') end it 'should return the name without extension' do subject.basename_without_ext('b/a.gif').should.be.eql?('a') subject.basename_without_ext('b/A.bundle').should.be.eql?('A') end end end
Version data entries
8 entries across 8 versions & 1 rubygems