spec/unit/interpolation_spec.rb in bulldog-0.0.15 vs spec/unit/interpolation_spec.rb in bulldog-0.1.0
- old
+ new
@@ -102,9 +102,14 @@
it "should use the style format over the basename override if both are present" do
@style[:format] = 'FMT'
interpolate("a/:extension/b", :basename => 'BASENAME.EXT').should == 'a/FMT/b'
end
+ it "should interpolate :root as Bulldog.path_root" do
+ Bulldog.path_root = 'TEST'
+ interpolate("a/:root/b").should == 'a/TEST/b'
+ end
+
it "should not modify the hash of overrides, if given" do
overrides = {:basename => 'BASENAME.EXT'}
interpolate("a/:extension/b", overrides).should == 'a/EXT/b'
overrides.should == {:basename => 'BASENAME.EXT'}
end