Sha256: d02f96f13da5ec39724fb0917afacf0d4f4e3d1b36c7a76f1bf14032c4444f1c
Contents?: true
Size: 509 Bytes
Versions: 48
Compression:
Stored size: 509 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' require 'shared_examples/calculator_shared_examples' module Spree RSpec.describe Calculator::PercentOnLineItem, type: :model do context "compute" do let(:line_item) { double("LineItem", amount: 100) } before { subject.preferred_percent = 15 } it "computes based on item price and quantity" do expect(subject.compute(line_item)).to eq 15 end end it_behaves_like 'a calculator with a description' end end
Version data entries
48 entries across 48 versions & 2 rubygems