Sha256: 404885c8a6c635d1ba447b18a3f6a1f8fbc0ee20582dd1eddb0333b4d288b050
Contents?: true
Size: 490 Bytes
Versions: 17
Compression:
Stored size: 490 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), "helper")) class JohnsonTest < Test::Unit::TestCase def test_shortcut_evaluate assert_equal(4, Johnson.evaluate("2 + 2")) end def test_can_provide_context_vars_to_evaluate assert_equal(4, Johnson.evaluate("2 + foo", :foo => 2)) end def test_evaluate_uses_a_new_runtime_each_time assert_equal(4, Johnson.evaluate("foo", :foo => 4)) assert_raise(Johnson::Error) { Johnson.evaluate("foo") } end end
Version data entries
17 entries across 17 versions & 2 rubygems