test/test_lookup.rb in rubigen-1.0.0 vs test/test_lookup.rb in rubigen-1.0.1
- old
+ new
@@ -1,10 +1,14 @@
-require File.dirname(__FILE__) + "/test_helper"
+require File.dirname(__FILE__) + "/test_generator_helper"
class TestLookup < Test::Unit::TestCase
include RubiGen
+ def setup
+ Base.reset_sources
+ end
+
def test_lookup_component
assert_nothing_raised(GeneratorError, "Could not find test_unit generator") { Base.lookup('test_unit') }
end
def test_lookup_unknown_component
@@ -81,10 +85,10 @@
assert_match(/\.rubigen\/\{rubygems_,ruby_\}generators/, user_path_source.path)
end
def test_use_application_sources
Base.use_application_sources!
- expected_path = File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib rubigen generators applications]))
+ expected_path = File.expand_path(File.join(File.dirname(__FILE__), %w[.. app_generators]))
builtin_source = Base.sources.find { |s| s.path == expected_path if s.respond_to?(:path) }
assert_not_nil(builtin_source, "Cannot find builtin generators")
assert_nothing_raised(GeneratorError) do
generator = Base.lookup('ruby_app')
end
\ No newline at end of file