1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make sure to compile each extension only once in ruby/spec

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-10-28 17:45:46 +00:00
parent f0c3df3113
commit e6222d1f2e
2 changed files with 3 additions and 8 deletions

View file

@ -2,6 +2,8 @@ require File.expand_path('../spec_helper', __FILE__)
require File.expand_path('../fixtures/class', __FILE__)
load_extension("class")
compile_extension("class_under_autoload")
compile_extension("class_id_under_autoload")
autoload :ClassUnderAutoload, "#{object_path}/class_under_autoload_spec"
autoload :ClassIdUnderAutoload, "#{object_path}/class_id_under_autoload_spec"
@ -276,8 +278,6 @@ describe "C-API Class function" do
end
it "defines a class for an existing Autoload" do
compile_extension("class_under_autoload")
ClassUnderAutoload.name.should == "ClassUnderAutoload"
end
@ -307,8 +307,6 @@ describe "C-API Class function" do
end
it "defines a class for an existing Autoload" do
compile_extension("class_id_under_autoload")
ClassIdUnderAutoload.name.should == "ClassIdUnderAutoload"
end

View file

@ -2,6 +2,7 @@ require File.expand_path('../spec_helper', __FILE__)
require File.expand_path('../fixtures/module', __FILE__)
load_extension('module')
compile_extension("module_under_autoload")
describe "CApiModule" do
@ -65,10 +66,6 @@ describe "CApiModule" do
end
describe "rb_define_module_under" do
before :each do
compile_extension("module_under_autoload")
end
it "defines a module for an existing Autoload with an extension" do
CApiModuleSpecs::ModuleUnderAutoload.name.should == "CApiModuleSpecs::ModuleUnderAutoload"
end