1
0

Fix linter issues

This commit is contained in:
Tim Kächele 2024-08-25 10:11:51 +02:00
parent 6dfaa6946a
commit 862e6d9270
5 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ module PlanetExpressExpress
[:LP, :L] => 6_90, [:LP, :L] => 6_90,
[:MR, :S] => 2_00, [:MR, :S] => 2_00,
[:MR, :M] => 3_00, [:MR, :M] => 3_00,
[:MR, :L] => 4_00, [:MR, :L] => 4_00
}.freeze }.freeze
DISCOUNT_LIMIT = 10_00 DISCOUNT_LIMIT = 10_00

View File

@ -12,7 +12,7 @@ module PlanetExpressExpress
if shipment[:discount] > available_budget if shipment[:discount] > available_budget
shipment[:discount] = available_budget shipment[:discount] = available_budget
end end
available_budget = available_budget - shipment[:discount] available_budget -= shipment[:discount]
end end
end end
end end

View File

@ -1,5 +1,5 @@
module PlanetExpressExpress module PlanetExpressExpress
require 'date' require "date"
class ShipmentReader class ShipmentReader
def initialize(prices) def initialize(prices)
@prices = prices @prices = prices

View File

@ -16,7 +16,7 @@ RSpec.describe PlanetExpressExpress do
PlanetExpressExpress::Formatter.new(output).format(shipments) PlanetExpressExpress::Formatter.new(output).format(shipments)
expected_output = File.read( expected_output = File.read(
File.expand_path("../fixtures/output.txt", __FILE__), File.expand_path("../fixtures/output.txt", __FILE__)
) )
output.rewind output.rewind