Files
news.gitea.happylizard.me/bin/gems/facets-3.1.0/test/standard/test_instantiable.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

41 lines
480 B
Ruby

require 'facets/instantiable'
test_case Instantiable do
setup do
@m = Module.new do
extend Instantiable
attr :a
def initialize( a )
@a = a
end
end
@n = Module.new do
include Instantiable
attr :a
def initialize( a )
@a = a
end
end
end
method :new do
test do
m = @m.new(1)
1.assert == m.a
end
test do
m = @n.new(1)
1.assert == m.a
end
end
end