Skip to content

Commit 094880d

Browse files
fix: remove prints from RSpec (#265)
1 parent db8a218 commit 094880d

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

config/initializers/prawn.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# frozen_string_literal: true
2+
3+
Prawn::Fonts::AFM.hide_m17n_warning = true if defined?(Prawn::Fonts::AFM)

lib/tasks/persist_in_database.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace :procedures do
1010
instance = Scripts::PopulateProcedures.new(path_file)
1111
instance.run!
1212

13-
puts "Procedures added in database"
13+
Rails.logger.warn "Procedures added in database"
1414
rescue StandardError => e
1515
raise StandardError, e.message
1616
end

lib/tasks/port_values_2008.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ namespace :port_values_2008 do
1717
)
1818
end
1919

20-
puts "Port values imported successfully"
20+
Rails.logger.warn "Port values imported successfully"
2121
end
2222
end

spec/tasks/persist_in_database_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
Rake::Task[task_name].reenable
2828
end
2929

30-
it {
31-
expect do
32-
run_rake
33-
end.to output("Procedures added in database\n").to_stdout
34-
}
35-
3630
context "when persists procedures in database" do
3731
before { run_rake }
3832

spec/tasks/port_values_2008_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
Rake::Task[task_name].execute
2121
end
2222

23-
it "outputs success message" do
24-
expect { Rake::Task[task_name].execute }.to output("Port values imported successfully\n").to_stdout
25-
end
26-
2723
it "imports port values from JSON file and creates PortValues" do
2824
allow(File).to receive(:read).and_return(file_content)
2925

0 commit comments

Comments
 (0)