Sha256: 6ba96dcc4b07b055075b806c69ad8db08e522713e36eea86ee3c22808d74a623

Contents?: true

Size: 667 Bytes

Versions: 33

Compression:

Stored size: 667 Bytes

Contents

class Nanoc::Int::ContextTest < Nanoc::TestCase
  def test_context_with_instance_variable
    # Create context
    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' })

    # Ensure correct evaluation
    assert_equal('bar', eval('foo', context.get_binding))
  end

  def test_example
    # Parse
    YARD.parse(LIB_DIR + '/nanoc/base/context.rb')

    # Run
    assert_examples_correct 'Nanoc::Int::Context#initialize'
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
nanoc-4.3.7 test/base/test_context.rb
nanoc-4.3.6 test/base/test_context.rb
nanoc-4.3.5 test/base/test_context.rb
nanoc-4.3.4 test/base/test_context.rb
nanoc-4.3.3 test/base/test_context.rb
nanoc-4.3.2 test/base/test_context.rb
nanoc-4.3.1 test/base/test_context.rb
nanoc-4.3.0 test/base/test_context.rb
nanoc-4.2.4 test/base/test_context.rb
nanoc-4.2.3 test/base/test_context.rb
nanoc-4.2.2 test/base/test_context.rb
nanoc-4.2.1 test/base/test_context.rb
nanoc-4.2.0 test/base/test_context.rb
nanoc-4.1.6 test/base/test_context.rb
nanoc-4.2.0b1 test/base/test_context.rb
nanoc-4.1.5 test/base/test_context.rb
nanoc-4.1.4 test/base/test_context.rb
nanoc-4.1.3 test/base/test_context.rb
nanoc-4.1.2 test/base/test_context.rb
nanoc-4.1.1 test/base/test_context.rb