-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not crash when trying to generate DSL RBIs on non-rails apps #847
Conversation
Signed-off-by: Alexandre Terrasa <[email protected]> Co-authored-by: Ufuk Kayserilioglu <[email protected]>
Looks like there's need to update a test expectation @Morriar |
Signed-off-by: Alexandre Terrasa <[email protected]> Co-authored-by: Ufuk Kayserilioglu <[email protected]>
74389c7
to
9ec7826
Compare
Should we print a message when we don't have a Rails application? My understanding of what will happen is that we're simply not going to process any constants, but maybe we could print a message saying |
We have a WIP branch to support non-rails application, it should be supported "soon", at least before Tapioca 1.0 is out ⛵ |
@@ -8,8 +8,8 @@ module Dsl | |||
module Compilers | |||
class ActiveRecordFixturesSpec < ::DslSpec | |||
describe "Tapioca::Dsl::Compilers::ActiveRecordFixtures" do | |||
describe "initialize" do | |||
it "gathers only the ActiveSupport::TestCase base class" do | |||
describe "without a Rails app" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
Do not crash when trying to generate DSL RBIs on non-rails apps
Motivation
Avoid getting a scary stack trace when running
tapioca dsl
in the wrong kind of app:Implementation
Check if we are in a Rails app with
Rails.application
.