Sha256: 04ea0bb8e22083a9656e07f97798b758cc23538b972e445ad5f5f19301149e10
Contents?: true
Size: 542 Bytes
Versions: 12
Compression:
Stored size: 542 Bytes
Contents
require 'spec_helper' module WLang describe Source, "path" do subject{ Source.new(source).path } context 'on a pure string' do let(:source){ "Hello world!" } it{ should be_nil } end context 'on a Path' do let(:source){ Path.here } it{ should eq(source.to_s) } end context 'on a File' do let(:source){ File.open(Path.here.to_s) } it{ should eq(__FILE__) } end it 'is aliased as to_path' do Source.new(Path.here).to_path.should eq(__FILE__) end end end
Version data entries
12 entries across 12 versions & 1 rubygems