Sha256: cc5824f89148b1c24f02f56a94d387b6455cbf37d9207b1da8ecf99ad2c27396
Contents?: true
Size: 631 Bytes
Versions: 40
Compression:
Stored size: 631 Bytes
Contents
class Nanoc::Int::CodeSnippetTest < Nanoc::TestCase def test_load # Initialize $complete_insane_parrot = 'meow' # Create code and load it code_snippet = Nanoc::Int::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 = Nanoc::Int::CodeSnippet.new("@foo = 'woof'", 'dog.rb') code_snippet.load # Ensure binding is correct assert_equal('meow', @foo) end end
Version data entries
40 entries across 40 versions & 1 rubygems