Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move module for autoload into fixture namespace

  • Loading branch information...
commit f4c3856f14ee921048432398c132f02ac5feb934 1 parent 493234c
Dirkjan Bussink authored October 01, 2012
3  spec/ruby/optional/capi/ext/module_under_autoload_spec.c
... ...
@@ -1,5 +1,6 @@
1 1
 #include "ruby.h"
2 2
 
3 3
 void Init_module_under_autoload_spec(void) {
4  
-  rb_define_module_under(rb_cObject, "ModuleUnderAutoload");
  4
+  VALUE specs = rb_const_get(rb_cObject, rb_intern("CApiModuleSpecs"));
  5
+  rb_define_module_under(specs, "ModuleUnderAutoload");
5 6
 }
1  spec/ruby/optional/capi/fixtures/module.rb
@@ -16,4 +16,5 @@ module M
16 16
 
17 17
   class Super
18 18
   end
  19
+  autoload :ModuleUnderAutoload, "#{extension_path}/module_under_autoload_spec"
19 20
 end
4  spec/ruby/optional/capi/module_spec.rb
@@ -3,8 +3,6 @@
3 3
 
4 4
 load_extension('module')
5 5
 
6  
-autoload :ModuleUnderAutoload, "#{extension_path}/module_under_autoload_spec"
7  
-
8 6
 describe "CApiModule" do
9 7
 
10 8
   before :each do
@@ -45,7 +43,7 @@
45 43
     it "defines a module for an existing Autoload" do
46 44
       compile_extension("module_under_autoload")
47 45
 
48  
-      ModuleUnderAutoload.name.should == "ModuleUnderAutoload"
  46
+      CApiModuleSpecs::ModuleUnderAutoload.name.should == "CApiModuleSpecs::ModuleUnderAutoload"
49 47
     end
50 48
   end
51 49
 

0 notes on commit f4c3856

Please sign in to comment.
Something went wrong with that request. Please try again.