test/base/test_context.rb in nanoc-4.4.5 vs test/base/test_context.rb in nanoc-4.4.6
- old
+ new
@@ -1,16 +1,18 @@
+require 'helper'
+
class Nanoc::Int::ContextTest < Nanoc::TestCase
def test_context_with_instance_variable
# Create context
- context = Nanoc::Int::Context.new({ foo: 'bar', baz: 'quux' })
+ context = Nanoc::Int::Context.new(foo: 'bar', baz: 'quux')
# Ensure correct evaluation
assert_equal('bar', eval('@foo', context.get_binding))
end
def test_context_with_instance_method
# Create context
- context = Nanoc::Int::Context.new({ foo: 'bar', baz: 'quux' })
+ context = Nanoc::Int::Context.new(foo: 'bar', baz: 'quux')
# Ensure correct evaluation
assert_equal('bar', eval('foo', context.get_binding))
end