Sha256: f9da319ca97fca3bfc76acc7540c6709b43be7c85eb906389f3d3524e50a1cfd

Contents?: true

Size: 478 Bytes

Versions: 3

Compression:

Stored size: 478 Bytes

Contents

shared_examples_for 'a Credere::Amount subtype' do |elements|
  let(:amount) { FactoryGirl.build(elements[:kind]) }
  subject { amount }

  it { is_expected.to  be_valid }

  it "should require an amount" do
    amount.amount = nil
    expect(amount).not_to be_valid
  end

  it "should require a entry" do
    amount.entry = nil
    expect(amount).not_to be_valid
  end

  it "should require an account" do
    amount.account = nil
    expect(amount).not_to be_valid
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
credere-0.10.3 spec/support/amount_shared_examples.rb
credere-0.10.2 spec/support/amount_shared_examples.rb
credere-0.10.1 spec/support/amount_shared_examples.rb