Sha256: 964b579d1c04a0c09c42be5fea404840d359602239dbe3e5472e4617b93320be

Contents?: true

Size: 550 Bytes

Versions: 3

Compression:

Stored size: 550 Bytes

Contents

require 'test_helper'

class SuperStructTest < Test::Unit::TestCase

  Supereroe = Class.new(SuperStruct.new(:name, :supername))

  
  def setup
    @klass = Supereroe
  end

  def test_initialize_with_block
    @klass.new do |instance|
      assert_instance_of  Supereroe, instance
      assert_kind_of      SuperStruct, instance
    end
  end

  def test_initialize_with_hash
    instance = @klass.new(:name => "Pippo", :supername => "SuperPippo")
    assert_equal "Pippo", instance.name
    assert_equal "SuperPippo", instance.supername
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
whois-0.9.0 test/testcases/responses/super_struct_test.rb
whois-0.8.1 test/testcases/responses/super_struct_test.rb
whois-0.8.0 test/testcases/responses/super_struct_test.rb