Sha256: 652541fc753cd43f82edf8805b746c95af100403505abbfa02b3761f924465e3

Contents?: true

Size: 1.52 KB

Versions: 2

Compression:

Stored size: 1.52 KB

Contents

# -*- encoding : utf-8 -*-
require 'helper'
class VariableTypesTest < Test::Unit::TestCase
  context "Definition & Types of variables" do
    setup do
      RedisModelExtension::Database.redis.flushdb

      @test_model = TestRedisModel.new()
    end 
    
    should "be have accessible fields" do
      assert @test_model.respond_to?(:integer)
      assert @test_model.respond_to?(:string)
      assert @test_model.respond_to?(:boolean)
      assert @test_model.respond_to?(:array)
      assert @test_model.respond_to?(:hash)
      assert @test_model.respond_to?(:time)
      assert @test_model.respond_to?(:date)
      assert @test_model.respond_to?(:float)
    end

    should "be have setable fields" do
      assert @test_model.respond_to?(:"integer=")
      assert @test_model.respond_to?(:"string=")
      assert @test_model.respond_to?(:"boolean=")
      assert @test_model.respond_to?(:"array=")
      assert @test_model.respond_to?(:"hash=")
      assert @test_model.respond_to?(:"time=")
      assert @test_model.respond_to?(:"date=")
      assert @test_model.respond_to?(:"float=")
    end

    should "be have field exist?" do
      assert @test_model.respond_to?(:"integer?")
      assert @test_model.respond_to?(:"string?")
      assert @test_model.respond_to?(:"boolean?")
      assert @test_model.respond_to?(:"array?")
      assert @test_model.respond_to?(:"hash?")
      assert @test_model.respond_to?(:"time?")
      assert @test_model.respond_to?(:"date?")
      assert @test_model.respond_to?(:"float?")
    end    

  end
end
    

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redis-model-extension-0.4.1 test/redis_model_parts/test_initialize.rb
redis-model-extension-0.4.0 test/redis_model_parts/test_initialize.rb