spec/lib/ruby-conf_spec.rb in ruby-conf-2.6.5 vs spec/lib/ruby-conf_spec.rb in ruby-conf-2.7.0
- old
+ new
@@ -431,19 +431,19 @@
describe "Automatically sets the RUBY_CONF variable" do
after do
dir = Dir["./**/test_conf.rb.tmpl"].first[/^(.*?)\/test_conf.rb.tmpl$/, 1]
- File.delete("#{dir}/test_conf.rbc") if File.exists?("#{dir}/test_conf.rbc")
+ File.delete("#{dir}/test_conf.rc") if File.exists?("#{dir}/test_conf.rc")
end
it "will autoload the first ruby-conf that it can find if none is provided" do
dir = Dir["./**/test_conf.rb.tmpl"].first[/^(.*?)\/test_conf.rb.tmpl$/, 1]
val = Random.rand.to_s
- File.write("#{dir}/test_conf.rbc", File.read("#{dir}/test_conf.rb.tmpl").gsub('{{VALUE}}', val))
+ File.write("#{dir}/test_conf.rc", File.read("#{dir}/test_conf.rb.tmpl").gsub('{{VALUE}}', val))
RUBY_CONF.should be_nil
RUBY_CONF.ident.should == "FOUND AND LOADED BASIC CONFIG #{val}"
loaded = RUBY_CONF.__rc_loaded_conf
@@ -451,10 +451,10 @@
File.mtime(loaded[:path]).to_i.should_not == loaded[:mtime]
RUBY_CONF.ident.should == "FOUND AND LOADED BASIC CONFIG #{val}"
RUBY_CONF.__rc_loaded_conf[:mtime].should == loaded[:mtime]
val = Random.rand.to_s
- File.write("#{dir}/test_conf.rbc", File.read("#{dir}/test_conf.rb.tmpl").gsub('{{VALUE}}', val))
+ File.write("#{dir}/test_conf.rc", File.read("#{dir}/test_conf.rb.tmpl").gsub('{{VALUE}}', val))
FileUtils.touch(loaded[:path], mtime: 100)
RUBY_CONF.ident.should == "FOUND AND LOADED BASIC CONFIG #{val}"
RUBY_CONF.__rc_loaded_conf[:mtime].should_not == loaded[:mtime]
RubyConf.clear