Sha256: 420ab1e368f87d6536097bfc83fcfafd1b09f1869bab5682023aafa758504589

Contents?: true

Size: 547 Bytes

Versions: 25

Compression:

Stored size: 547 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

25 entries across 25 versions & 1 rubygems

Version Path
whois-1.2.2 test/whois/answer/super_struct_test.rb
whois-1.2.1 test/whois/answer/super_struct_test.rb
whois-1.2.0 test/whois/answer/super_struct_test.rb
whois-1.1.8 test/testcases/responses/super_struct_test.rb
whois-1.1.7 test/testcases/responses/super_struct_test.rb
whois-1.1.6 test/testcases/responses/super_struct_test.rb
whois-1.1.5 test/testcases/responses/super_struct_test.rb
whois-1.1.4 test/testcases/responses/super_struct_test.rb
whois-1.1.3 test/testcases/responses/super_struct_test.rb
whois-1.1.2 test/testcases/responses/super_struct_test.rb
whois-1.1.1 test/testcases/responses/super_struct_test.rb
whois-1.1.0 test/testcases/responses/super_struct_test.rb
whois-1.0.12 test/testcases/responses/super_struct_test.rb
whois-1.0.11 test/testcases/responses/super_struct_test.rb
whois-1.0.10 test/testcases/responses/super_struct_test.rb
whois-1.0.9 test/testcases/responses/super_struct_test.rb
whois-1.0.8 test/testcases/responses/super_struct_test.rb
whois-1.0.7 test/testcases/responses/super_struct_test.rb
whois-1.0.6 test/testcases/responses/super_struct_test.rb
whois-1.0.5 test/testcases/responses/super_struct_test.rb