Author: vborja
Date: Wed Jun 4 16:03:22 2008
New Revision: 663403
URL: http://svn.apache.org/viewvc?rev=663403&view=rev
Log:
BUILDR-77. Adding specs for layout (should not distinguish between strings and
symbols)
Modified:
incubator/buildr/trunk/spec/project_spec.rb
Modified: incubator/buildr/trunk/spec/project_spec.rb
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/project_spec.rb?rev=663403&r1=663402&r2=663403&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/project_spec.rb (original)
+++ incubator/buildr/trunk/spec/project_spec.rb Wed Jun 4 16:03:22 2008
@@ -194,6 +194,18 @@
@layout[:foo, :bar] = 'none'
@layout.expand(:foo, :bar).should eql('none')
end
+
+ it 'should map strings to path' do
+ @layout[:foo, "bar"] = 'none'
+ @layout.expand(:foo, :bar).should eql('none')
+ @layout.expand(:foo, 'bar').should eql('none')
+ end
+
+ it 'should ignore nil elements' do
+ @layout[:foo, :bar] = 'none'
+ @layout.expand(:foo, nil, :bar).should eql('none')
+ @layout.expand(nil, :foo).should eql('foo')
+ end
it 'should return nil if path not mapped' do
@layout[:foo].should be_nil