Sha256: fdf1925de97d9894f20e80c3c80a6499dfa40cef1fb53c297dcb53122ee8fc7c

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 Bytes

Contents

require "test/unit"
require "routespec"

class TestTemplateVars < Test::Unit::TestCase
  def test_template_class
    assert_kind_of Class, Routespec::TemplateVars
    assert Routespec::TemplateVars.new
  end

  def test_get_binding
    obj = Routespec::TemplateVars.new
    assert_kind_of Binding, obj.get_binding
    refute eval("@cool", obj.get_binding) 
    obj.instance_variable_set("@cool", "dude")
    act = eval("@cool", obj.get_binding)
    assert_equal "dude", act
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
routespec-0.0.1 test/test_template_vars.rb