Sha256: b3681383d88540a9826321222c714ec20612917175153bb8bb93917a1d836f4f

Contents?: true

Size: 450 Bytes

Versions: 5

Compression:

Stored size: 450 Bytes

Contents

covers 'facets/kernel/temporarily'

test_case Kernel do

  method :temporarily do

    test "global variable" do
      $temporary_variable = true
      temporarily('$temporary_variable'=>false) do
        $temporary_variable.assert == false
      end
      $temporary_variable.assert == true
    end

    test "instance variable" do
      @x = 1
      temporarily('@x'=>2) do
        @x.assert == 2
      end
      @x.assert == 1
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/kernel/test_temporarily.rb
facets-3.1.0 test/core/kernel/test_temporarily.rb
facets-3.0.0 test/core/kernel/test_temporarily.rb
facets-2.9.3 test/core/kernel/test_temporarily.rb
facets-2.9.2 test/core/kernel/test_temporarily.rb