Sha256: 77ce8f84927cf577607adf6958c0f81910615df80123404b2b2ae2e5843808b4
Contents?: true
Size: 504 Bytes
Versions: 15
Compression:
Stored size: 504 Bytes
Contents
require 'spec_helper' require 'shared_examples/calculator_shared_examples' module Spree class Calculator describe 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 end
Version data entries
15 entries across 15 versions & 1 rubygems