")
+ done()
+ })
+ })
+
+ it("should provide current path in to an index page in a subdirectory", function(done){
+ poly.render("one/two/index.jade", function(error, body){
+ should.not.exist(error)
+ should.exist(body)
+ body.should.include("
about")
+ body.should.not.include("index")
+ done()
+ })
+ })
+
+ it("should provide a portion of the current path", function(done){
+ poly.render("contact/index.ejs", function(error, body){
+ should.not.exist(error)
+ should.exist(body)
+ body.should.include("contact")
+ done()
+ })
+ })
+
+
+ })
+
+ describe("source", function(){
+ var root = __dirname + "/fixtures/current/source"
+ var poly = polymer.root(root)
+
+ it("should provide the current source", function(done){
+ poly.render("about.jade", function(error, body){
+ should.not.exist(error)
+ should.exist(body)
+ body.should.include("About")
+ done()
+ })
+ })
+
+ })
+
+})
\ No newline at end of file
diff --git a/test/fixtures/current/path/contact/index.ejs b/test/fixtures/current/path/contact/index.ejs
new file mode 100644
index 000000000..fd8374a08
--- /dev/null
+++ b/test/fixtures/current/path/contact/index.ejs
@@ -0,0 +1,8 @@
+
+
+
+ <%= current.path[0] %>
+
+
+
+
\ No newline at end of file
diff --git a/test/fixtures/current/path/index.jade b/test/fixtures/current/path/index.jade
new file mode 100644
index 000000000..39b3d6d46
--- /dev/null
+++ b/test/fixtures/current/path/index.jade
@@ -0,0 +1,6 @@
+doctype
+html
+ head
+ title Home
+ body
+ h1= current.path
\ No newline at end of file
diff --git a/test/fixtures/current/path/one/two/index.jade b/test/fixtures/current/path/one/two/index.jade
new file mode 100644
index 000000000..0615fb554
--- /dev/null
+++ b/test/fixtures/current/path/one/two/index.jade
@@ -0,0 +1,9 @@
+doctype
+html
+ head
+ title Two
+ body
+ h1 Where am I?
+ ul
+ each item in current.path
+ li: a(href="#")= item
\ No newline at end of file
diff --git a/test/fixtures/current/path/one/two/three/about.jade b/test/fixtures/current/path/one/two/three/about.jade
new file mode 100644
index 000000000..23834bb74
--- /dev/null
+++ b/test/fixtures/current/path/one/two/three/about.jade
@@ -0,0 +1,9 @@
+doctype
+html
+ head
+ title About
+ body
+ h1 Where am I?
+ ul
+ each item in current.path
+ li: a(href="#")= item
\ No newline at end of file
diff --git a/test/fixtures/current/source/about.jade b/test/fixtures/current/source/about.jade
new file mode 100644
index 000000000..94c965334
--- /dev/null
+++ b/test/fixtures/current/source/about.jade
@@ -0,0 +1,8 @@
+doctype
+html
+ head
+ title About
+ body
+ nav
+ a(href="/") Home
+ a(href="about" class="#{ current.source == 'about' ? 'active' : 'inactive' }") About