This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
||||
require "<%= config[:namespaced_path] %>"
|
||||
|
||||
require "minitest/autorun"
|
||||
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class <%= config[:minitest_constant_name] %> < Minitest::Test
|
||||
def test_that_it_has_a_version_number
|
||||
refute_nil ::<%= config[:constant_name] %>::VERSION
|
||||
end
|
||||
|
||||
<%- if config[:ext] == 'rust' -%>
|
||||
def test_hello_world
|
||||
assert_equal "Hello earth, from Rust!", <%= config[:constant_name] %>.hello("world")
|
||||
end
|
||||
<%- else -%>
|
||||
def test_it_does_something_useful
|
||||
assert false
|
||||
end
|
||||
<%- end -%>
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class <%= config[:constant_name] %>Test < Test::Unit::TestCase
|
||||
test "VERSION" do
|
||||
assert do
|
||||
::<%= config[:constant_name] %>.const_defined?(:VERSION)
|
||||
end
|
||||
end
|
||||
|
||||
test "something useful" do
|
||||
assert_equal("expected", "actual")
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
||||
require "<%= config[:namespaced_path] %>"
|
||||
|
||||
require "test-unit"
|
||||
Reference in New Issue
Block a user