Class TestInstanceEvalWithArgs
In: lib/core_ex/object/instance_eval_with_args.rb
Parent: ::Test::Unit::TestCase

Methods

Public Instance methods

[Source]

# File lib/core_ex/object/instance_eval_with_args.rb, line 39
    def setup
    end

[Source]

# File lib/core_ex/object/instance_eval_with_args.rb, line 42
    def teardown
    end

[Source]

# File lib/core_ex/object/instance_eval_with_args.rb, line 45
    def test_instance_eval
      assert_nothing_raised do
        @res = "foo".instance_eval_with_args(42) do |x|
          x + 1
        end
      end
      assert_equal 43, @res
    end

[Validate]