Sha256: a73e1dc26828e90db404f2b29e73f57c93b8516ec610d2ecb6e72172d0feb5c0
Contents?: true
Size: 680 Bytes
Versions: 8
Compression:
Stored size: 680 Bytes
Contents
# encoding: utf-8 class Nanoc3::CodeSnippetTest < MiniTest::Unit::TestCase include Nanoc3::TestHelpers def test_load # Initialize $complete_insane_parrot = 'meow' # Create code and load it code_snippet = Nanoc3::CodeSnippet.new("$complete_insane_parrot = 'woof'", 'parrot.rb') code_snippet.load # Ensure code is loaded assert_equal('woof', $complete_insane_parrot) end def test_load_with_toplevel_binding # Initialize @foo = 'meow' # Create code and load it code_snippet = Nanoc3::CodeSnippet.new("@foo = 'woof'", 'dog.rb') code_snippet.load # Ensure binding is correct assert_equal('meow', @foo) end end
Version data entries
8 entries across 8 versions & 1 rubygems