test/base/test_layout.rb in nanoc-3.7.3 vs test/base/test_layout.rb in nanoc-3.7.4
- old
+ new
@@ -2,44 +2,44 @@
class Nanoc::LayoutTest < Nanoc::TestCase
def test_initialize
# Make sure attributes are cleaned
- layout = Nanoc::Layout.new("content", { 'foo' => 'bar' }, '/foo/')
+ layout = Nanoc::Layout.new('content', { 'foo' => 'bar' }, '/foo/')
assert_equal({ :foo => 'bar' }, layout.attributes)
# Make sure identifier is cleaned
- layout = Nanoc::Layout.new("content", { 'foo' => 'bar' }, 'foo')
+ layout = Nanoc::Layout.new('content', { 'foo' => 'bar' }, 'foo')
assert_equal('/foo/', layout.identifier)
end
def test_frozen_identifier
- layout = Nanoc::Layout.new("foo", {}, '/foo')
+ layout = Nanoc::Layout.new('foo', {}, '/foo')
assert_raises_frozen_error do
layout.identifier.chop!
end
end
def test_lookup_with_known_attribute
# Create layout
- layout = Nanoc::Layout.new("content", { 'foo' => 'bar' }, '/foo/')
+ layout = Nanoc::Layout.new('content', { 'foo' => 'bar' }, '/foo/')
# Check attributes
assert_equal('bar', layout[:foo])
end
def test_lookup_with_unknown_attribute
# Create layout
- layout = Nanoc::Layout.new("content", { 'foo' => 'bar' }, '/foo/')
+ layout = Nanoc::Layout.new('content', { 'foo' => 'bar' }, '/foo/')
# Check attributes
assert_equal(nil, layout[:filter])
end
def test_dump_and_load
layout = Nanoc::Layout.new(
- "foobar",
+ 'foobar',
{ :a => { :b => 123 }},
'/foo/')
layout = Marshal.load(Marshal.dump(layout))