diff --git a/test/helper.rb b/test/helper.rb index ccbc8b4c..8e4a8887 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -13,6 +13,9 @@ ENV['RACK_ENV'] = 'test' require 'gollum' require 'gollum/frontend/app' +# Disable the metadata feature +$METADATA = false + # Make sure we're in the test dir, the tests expect that to be the current # directory. TEST_DIR = File.join(File.dirname(__FILE__), *%w[.]) diff --git a/test/test_markup.rb b/test/test_markup.rb index a8a10e18..1e294ff3 100644 --- a/test/test_markup.rb +++ b/test/test_markup.rb @@ -627,7 +627,7 @@ np.array([[2,2],[1,3]],np.float) assert_not_nil rendered.match(output) end - ######################################################################### +if $METADATA ######################################################################### # # Metadata Blocks # @@ -677,7 +677,7 @@ np.array([[2,2],[1,3]],np.float) assert_equal output, rendered assert_equal result, page.metadata end - +end # if $METADATA ######################################################################### # # Various diff --git a/test/test_page.rb b/test/test_page.rb index 24c8ce13..fc1c34a4 100644 --- a/test/test_page.rb +++ b/test/test_page.rb @@ -228,11 +228,12 @@ context "within a sub-directory" do assert page.footer.raw_data =~ /^Lord of the Rings/ end +if $METADATA test "get metadata on page" do page = @wiki.page('Elrond') assert_equal Gollum::Page, page.class assert_equal 'elf', page.metadata['race'] end - end +end \ No newline at end of file diff --git a/test/test_wiki.rb b/test/test_wiki.rb index 3c0e085a..3906b4a0 100644 --- a/test/test_wiki.rb +++ b/test/test_wiki.rb @@ -198,6 +198,7 @@ context "Wiki page writing" do assert_equal cd[:email], @wiki.repo.commits.first.author.email end +if $METADATA test "page title override with metadata" do @wiki.write_page("Gollum", :markdown, "", commit_details) @@ -205,6 +206,7 @@ context "Wiki page writing" do assert_equal 'Over', page.url_path_title end +end test "update page with format change" do @wiki.write_page("Gollum", :markdown, "# Gollum", commit_details)