Sha256: dceeb562b367db1775c090690a4ccbb7111b5afba8c154906aee35682f4443e2
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
require 'spec_helper' describe Jackpot::Subscription do it { should have_many(:customers) } it { should validate_presence_of :name } it { should have_many(:payments) } describe ".charge" do let(:customer_to_be_charged) { Factory(:customer_with_subscription) } subject { customer_to_be_charged.subscription } it "creates a payment for the given customer" , :vcr => { :cassette_name => "jackpot/subscription_charge" } do expect { subject.charge(customer_to_be_charged)}.to change(subject.payments, :count).by(1) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jackpot-0.0.3 | spec/models/jackpot/subscription_spec.rb |