Sha256: 4abbf6420cde33bbed08231db020aa0acc2a5c7d0474f09359c7ac0861408a4d

Contents?: true

Size: 477 Bytes

Versions: 6

Compression:

Stored size: 477 Bytes

Contents

shared_examples_for 'a Plutus::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

6 entries across 6 versions & 2 rubygems

Version Path
plutus-0.17 spec/support/amount_shared_examples.rb
plutus-0.16 spec/support/amount_shared_examples.rb
plutus-0.15 spec/support/amount_shared_examples.rb
plutus-0.14 spec/support/amount_shared_examples.rb
odania_plutus-0.13 spec/support/amount_shared_examples.rb
plutus-0.13 spec/support/amount_shared_examples.rb