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