Skip to content

Commit c342929

Browse files
committed
tiny spec cleanup
1 parent 01a9436 commit c342929

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

spec/sqlite_extensions/rails_spec.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@
88
#
99
RSpec.describe "Rails usage" do # rubocop:disable RSpec/DescribeClass
1010
before do
11-
gemspec = instance_double(
12-
Gem::Specification,
13-
require_path: File.join(__dir__, "../../lib")
14-
)
15-
allow(Gem).to receive(:loaded_specs).and_return("sqlite_extensions-uuid" => gemspec)
11+
allow(Gem)
12+
.to receive(:loaded_specs)
13+
.and_return("sqlite_extensions-uuid" => instance_double(
14+
Gem::Specification,
15+
require_path: File.join(__dir__, "../../lib")
16+
))
1617

17-
ENV["RAILS_ENV"] = "production"
18+
stub_const("ENV", {"RAILS_ENV" => "production"})
1819

1920
# config/application.rb
2021
stub_const("TestApp", Class.new(Rails::Application) do
2122
config.load_defaults Rails::VERSION::STRING.to_f
22-
config.eager_load = false
23+
config.eager_load = true
2324
config.secret_key_base = "secret_key_base"
25+
config.logger = ActiveSupport::Logger.new($stdout)
2426
end)
2527
Rails.application.initialize!
2628

0 commit comments

Comments
 (0)