Sha256: 8c3ec6a6c68cca4525ba7f814c36ba707f674a644f236a1a581aafb2a4f3f0c0

Contents?: true

Size: 488 Bytes

Versions: 3

Compression:

Stored size: 488 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class SdbStringTest < Test::Unit::TestCase

  include DeadSimpleDb

  should "cast a integer to string" do
    string = SdbString.new(10)
    assert_equal '10', string.casted
  end

  should "be identical if provided a string" do
    string = SdbString.new('foo')
    assert_equal 'foo', string.casted
  end

  should "be a string when converted to string" do
    string = SdbString.new(1.1)
    assert_equal '1.1', string.to_s
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hungryblank-dead_simple_db-0.0.1 test/sdb_string_test.rb
hungryblank-dead_simple_db-0.0.2 test/sdb_string_test.rb
hungryblank-dead_simple_db-0.0.3 test/sdb_string_test.rb