From af954271dfdf39c2ea38defd5ffe47bc3f91942f Mon Sep 17 00:00:00 2001 From: "Tj (bougyman) Vanderpoel" Date: Wed, 10 Apr 2024 23:41:13 -0400 Subject: [PATCH] Working simple test --- namespacer.gemspec | 2 +- test/test_namespacer.rb | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/namespacer.gemspec b/namespacer.gemspec index de438df..4035c7d 100644 --- a/namespacer.gemspec +++ b/namespacer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |spec| spec.summary = 'Namespace classes and modules in existing ruby source code.' spec.description = 'For those times you realize you should have namespaced your class(es) or module(s).' spec.homepage = 'https://github.com/rubyists/namespacer' - spec.required_ruby_version = '>= 2.6.0' + spec.required_ruby_version = '~> 3.3' spec.metadata['allowed_push_host'] = 'https://rubygems.org' diff --git a/test/test_namespacer.rb b/test/test_namespacer.rb index 305faae..0db25dc 100644 --- a/test/test_namespacer.rb +++ b/test/test_namespacer.rb @@ -4,10 +4,13 @@ class TestNamespacer < Minitest::Test def test_that_it_has_a_version_number - refute_nil ::Namespacer::VERSION + refute_nil ::Rubyists::Namespacer::VERSION end def test_it_does_something_useful - assert false + namespaced = Rubyists::Namespacer.namespace!('class Foo; end', 'Rubyists::Namespace::Test') + expected = "module Rubyists\n module Namespace\n module Test\n class Foo\n end\n end\n end\nend\n" + + assert_equal expected, namespaced end end