Sha256: 8eb25bbe016fda514e0114ba06f2ec30b03deeb22d83926cef6bd08d56091442

Contents?: true

Size: 638 Bytes

Versions: 1

Compression:

Stored size: 638 Bytes

Contents

require 'test_helper'

class CassandraObject::Schema::TasksTest < CassandraObject::TestCase
  test "column_families" do
    assert_equal ['Issues'], CassandraObject::Schema.column_families
  end

  test "dump" do
    io = StringIO.new

    CassandraObject::Schema.dump(io)
    io.rewind

    assert_match /Issues/, io.read
  end

  test "load" do
    CassandraObject::Schema.expects(:keyspace_execute).with("DO STUFF;")
    CassandraObject::Schema.expects(:keyspace_execute).with("AND MORE;")

    CassandraObject::Schema.load StringIO.new(
      "DO\n" +
      " STUFF;\n" +
      "\n" +
      "AND\n" +
      " MORE;\n"
    )
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gotime-cassandra_object-4.12.0 test/unit/schema/tasks_test.rb