Skip to content

Commit

Permalink
Working simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
bougyman committed Apr 11, 2024
1 parent 1f68c67 commit af95427
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion namespacer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
7 changes: 5 additions & 2 deletions test/test_namespacer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit af95427

Please sign in to comment.