test/base/test_item_rep.rb in nanoc-4.2.0 vs test/base/test_item_rep.rb in nanoc-4.2.1
- old
+ new
@@ -2,11 +2,11 @@
def test_compiled_content_with_only_last_available
# Create rep
item = Nanoc::Int::Item.new(
'blah blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.snapshot_contents = {
last: Nanoc::Int::TextualContent.new('last content'),
}
rep.expects(:compiled?).returns(true)
@@ -17,11 +17,11 @@
def test_compiled_content_with_pre_and_last_available
# Create rep
item = Nanoc::Int::Item.new(
'blah blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.snapshot_contents = {
pre: Nanoc::Int::TextualContent.new('pre content'),
last: Nanoc::Int::TextualContent.new('last content'),
}
rep.expects(:compiled?).returns(true)
@@ -33,11 +33,11 @@
def test_compiled_content_with_custom_snapshot
# Create rep
item = Nanoc::Int::Item.new(
'blah blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.snapshot_contents = {
pre: Nanoc::Int::TextualContent.new('pre content'),
last: Nanoc::Int::TextualContent.new('last content'),
}
rep.expects(:compiled?).returns(true)
@@ -49,11 +49,11 @@
def test_compiled_content_with_invalid_snapshot
# Create rep
item = Nanoc::Int::Item.new(
'blah blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.snapshot_contents = {
pre: Nanoc::Int::TextualContent.new('pre content'),
last: Nanoc::Int::TextualContent.new('last content'),
}
@@ -66,11 +66,11 @@
def test_compiled_content_with_uncompiled_content
# Create rep
item = Nanoc::Int::Item.new(
'blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.expects(:compiled?).returns(false)
# Check
assert_raises(Nanoc::Int::Errors::UnmetDependency) do
rep.compiled_content
@@ -80,11 +80,11 @@
def test_compiled_content_with_moving_pre_snapshot
# Create rep
item = Nanoc::Int::Item.new(
'blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.expects(:compiled?).returns(false)
rep.snapshot_contents = {
pre: Nanoc::Int::TextualContent.new('pre!'),
last: Nanoc::Int::TextualContent.new('last!'),
}
@@ -98,11 +98,11 @@
def test_compiled_content_with_non_moving_pre_snapshot
# Create rep
item = Nanoc::Int::Item.new(
'blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.expects(:compiled?).returns(false)
rep.snapshot_defs = [
Nanoc::Int::SnapshotDef.new(:pre, true),
]
rep.snapshot_contents = {
@@ -118,10 +118,10 @@
def test_compiled_content_with_multiple_pre_snapshots
# Create rep
item = Nanoc::Int::Item.new(
'blah blah', {}, '/'
)
- rep = Nanoc::Int::ItemRep.new(item, nil)
+ rep = Nanoc::Int::ItemRep.new(item, :donkeys)
rep.expects(:compiled?).returns(false)
rep.snapshot_defs = [
Nanoc::Int::SnapshotDef.new(:pre, false),
Nanoc::Int::SnapshotDef.new(:pre, true),
]