Skip to content

Commit

Permalink
Fix some minor things in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
parkr authored and pathawks committed May 24, 2016
1 parent d84844c commit de5970a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions lib/jekyll.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ def configuration(override = Hash.new)
end

# Merge DEFAULTS < _config.yml < override
config = Configuration.from Utils.deep_merge_hashes(config, override).stringify_keys
set_timezone(config['timezone']) if config['timezone']

config
Configuration.from(Utils.deep_merge_hashes(config, override)).tap do |config|
set_timezone(config['timezone']) if config['timezone']
end
end

# Public: Set the TZ environment variable to use the timezone specified
Expand Down
8 changes: 4 additions & 4 deletions test/test_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TestConfiguration < JekyllUnitTest

should "add default collections" do
result = Configuration.from({})
assert_equal result["collections"], {"posts" => {"output" => true, "permalink" => "/:categories/:year/:month/:day/:title.html"}}
assert_equal result["collections"], {"posts" => {"output" => true, "permalink" => "/:categories/:year/:month/:day/:title:output_ext"}}
end

should "NOT backwards-compatibilize" do
Expand Down Expand Up @@ -325,7 +325,7 @@ class TestConfiguration < JekyllUnitTest
"docs" => {},
"posts" => {
"output" => true,
"permalink" => "/:categories/:year/:month/:day/:title.html"
"permalink" => "/:categories/:year/:month/:day/:title:output_ext"
}}})
end

Expand All @@ -335,7 +335,7 @@ class TestConfiguration < JekyllUnitTest
"collections" => {
"posts" => {
"output" => true,
"permalink" => "/:categories/:year/:month/:day/:title.html"
"permalink" => "/:categories/:year/:month/:day/:title:output_ext"
}}})
end

Expand All @@ -345,7 +345,7 @@ class TestConfiguration < JekyllUnitTest
"collections" => {
"posts" => {
"output" => true,
"permalink" => "/:categories/:year/:month/:day/:title.html"
"permalink" => "/:categories/:year/:month/:day/:title:output_ext"
}}})
end

Expand Down

0 comments on commit de5970a

Please sign in to comment.