Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Small DSL refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
paracycle committed Apr 12, 2024
1 parent d9d4a7e commit 525d61a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions lib/tapioca/dsl/compilers/measured_rails.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# typed: strict
# frozen_string_literal: true

begin
require "tapioca/dsl"
rescue LoadError
return
end
return unless defined?(::Measured::Rails::ActiveRecord)

module Tapioca
module Dsl
Expand Down
4 changes: 2 additions & 2 deletions test/tapioca/dsl/compilers/measured_rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

require "test_helper"
require "sorbet-runtime"
require "tapioca/internal"
require "tapioca/helpers/test/dsl_compiler"
require "tapioca/dsl/compilers/measured_rails"

Expand All @@ -16,7 +16,7 @@ class MeasuredRailsTest < ActiveSupport::TestCase
use_dsl_compiler(Tapioca::Dsl::Compilers::MeasuredRails)
end

test "#initilize gathers only ActiveRecord subclasses" do
test "#initialize gathers only ActiveRecord subclasses" do
add_ruby_file("content.rb", <<~RUBY)
class Post < ActiveRecord::Base
end
Expand Down

0 comments on commit 525d61a

Please sign in to comment.