lib/souls/generate/rspec_resolver.rb in souls-0.28.5 vs lib/souls/generate/rspec_resolver.rb in souls-0.28.6

- old
+ new

@@ -21,11 +21,11 @@ @relation_params = [] File.open(file_path, "a") do |new_line| File.open(path, "r") do |f| f.each_line.with_index do |line, _i| if @on - if line.include?("end") || line.include?("t.index") + if line.include?("t.index") || line.strip == "end" if @relation_params.empty? new_line.write(<<-TEXT) let!(:#{class_name}) { FactoryBot.create(:#{class_name}) } let(:query) do @@ -75,11 +75,11 @@ @on = false File.open(file_path, "a") do |new_line| File.open(path, "r") do |f| f.each_line.with_index do |line, _i| if @on - if line.include?("end") || line.include?("t.index") + if line.include?("t.index") || line.strip == "end" new_line.write(<<-TEXT) } } nodes { id @@ -131,10 +131,10 @@ @on = false File.open(file_path, "a") do |new_line| File.open(path, "r") do |f| f.each_line.with_index do |line, _i| if @on - if line.include?("end") || line.include?("t.index") + if line.include?("t.index") || line.strip == "end" new_line.write(<<~TEXT) ) end end end