Sha256: 549f039464bd94bcaf2c23c7a697d1e939e57c10b6151c3e3a2588f475519181

Contents?: true

Size: 748 Bytes

Versions: 87

Compression:

Stored size: 748 Bytes

Contents

require 'helper'

class TestStaticEnvironment < Minitest::Test
  def setup
    @env = Parser::StaticEnvironment.new
  end

  def test_declare
    refute @env.declared?(:foo)

    @env.declare :foo

    assert @env.declared?(:foo)
  end

  def test_extend_static
    @env.declare :foo
    @env.extend_static
    @env.declare :bar

    refute @env.declared?(:foo)
    assert @env.declared?(:bar)
  end

  def test_extend_dynamic
    @env.declare :foo
    @env.extend_dynamic
    @env.declare :bar

    assert @env.declared?(:foo)
    assert @env.declared?(:bar)
  end

  def test_unextend
    @env.declare :foo
    @env.extend_dynamic
    @env.declare :bar
    @env.unextend

    assert @env.declared?(:foo)
    refute @env.declared?(:bar)
  end
end

Version data entries

87 entries across 87 versions & 5 rubygems

Version Path
parser-2.3.1.0 test/test_static_environment.rb
parser-2.3.0.7 test/test_static_environment.rb
parser-2.3.0.6 test/test_static_environment.rb
parser-2.3.0.5 test/test_static_environment.rb
parser-2.3.0.4 test/test_static_environment.rb
parser-2.3.0.3 test/test_static_environment.rb
parser-2.3.0.2 test/test_static_environment.rb
parser-2.3.0.1 test/test_static_environment.rb
parser-2.3.0.0 test/test_static_environment.rb
parser-2.3.0.pre.6 test/test_static_environment.rb
parser-2.3.0.pre.5 test/test_static_environment.rb
parser-2.3.0.pre.4 test/test_static_environment.rb
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_static_environment.rb
parser-2.3.0.pre.3 test/test_static_environment.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_static_environment.rb
parser-2.2.3.0 test/test_static_environment.rb
parser-2.2.2.6 test/test_static_environment.rb
parser-2.3.0.pre.2 test/test_static_environment.rb
parser-2.3.0.pre.1 test/test_static_environment.rb
parser-2.2.2.5 test/test_static_environment.rb