Sha256: 04f68bce8050d34165360a08a6c32148dc69f55a1a5c17b022f27be928786224
Contents?: true
Size: 686 Bytes
Versions: 334
Compression:
Stored size: 686 Bytes
Contents
require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helper.rb') require 'rbbt/util/R' class TestR < Test::Unit::TestCase def test_sum assert_equal "6", R.run('cat(3+3)').read.split(/\n/).last end def test_tsv_R tsv = TSV.setup({:a => 1, :b => 2}) tsv2 = tsv.R <<-EOF data = data + 1 EOF assert_equal "2", tsv2["a"].first end def test_format_tsv tsv = TSV.setup({"a" => [1], "b" => [2]}, :type => :list, :key_field => "Letter", :fields => ["Number"]) assert tsv.transpose("Field").include? "Number" end def test_error assert_raise ProcessFailed do R.run <<-EOF fadsfasdf EOF end end end
Version data entries
334 entries across 334 versions & 1 rubygems