autoloading 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autoloading.rb +1 -1
- data/lib/autoloading/version.rb +1 -1
- data/test/autoloading_spec.rb +18 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77128c169f9a8e7d0e675cb2e7d4ea979023be4f
|
4
|
+
data.tar.gz: c8ac7617269d7e4e4b8ef2456924c2bf70a0bfb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef59748137907e428cfbefa5134cbdcc78a0b085f3743ecae700b4184dcdbd9f48721e3c134d9ee8bae5123e2353a9ce1636b48519bc6253af8e78282c23ef2a
|
7
|
+
data.tar.gz: 3905b9dd9e80bd8c0996e2a033c6a5ab86abf4c9c34661e473246a290ab2c36b8510d733d59d88ce448c4d6b8793a40cceb8b2bd8cf23ee6909af7fa636bf43c
|
data/lib/autoloading.rb
CHANGED
data/lib/autoloading/version.rb
CHANGED
data/test/autoloading_spec.rb
CHANGED
@@ -46,5 +46,23 @@ describe Autoloading do
|
|
46
46
|
require 'zoo'
|
47
47
|
Zoo::Kitty
|
48
48
|
end
|
49
|
+
|
50
|
+
it "can autoload without namespacing - array" do
|
51
|
+
create_test_file "space.rb", <<-FILE
|
52
|
+
module Space
|
53
|
+
extend Autoloading
|
54
|
+
autoload_without_namespacing %w(planets asteroids)
|
55
|
+
end
|
56
|
+
FILE
|
57
|
+
|
58
|
+
create_test_file "space/planets/saturn.rb", <<-FILE
|
59
|
+
module Space::Saturn
|
60
|
+
end
|
61
|
+
FILE
|
62
|
+
|
63
|
+
$: << temp_file_root.to_s
|
64
|
+
require 'space'
|
65
|
+
Space::Saturn
|
66
|
+
end
|
49
67
|
end
|
50
68
|
|