# frozen_string_literal: true

require 'rails_helper'

module Spree
  RSpec.describe ReturnsCalculator, type: :model do
    let(:return_item) { build(:return_item) }
    subject { ReturnsCalculator.new }

    it 'compute_shipment must be overridden' do
      expect {
        subject.compute(return_item)
      }.to raise_error NotImplementedError
    end
  end
end

# frozen_string_literal: true

require 'rails_helper'

module Spree
  RSpec.describe ReturnsCalculator, type: :model do
    let(:return_item) { build(:return_item) }
    subject { described_class.new }

    it 'compute must be overridden' do
      expect {
        subject.compute(return_item)
      }.to raise_error NotImplementedError
    end
  end
end

Fix description of Spree::ReturnCalculator spec
Fix description of Spree::ReturnCalculator spec

The right method to be overridden is `compute` and
not `compute_shipment`.

Take advantage of the change to use described_class here.
