store account description

This commit is contained in:
Josh Holtrop 2013-08-31 16:34:42 -04:00
parent 326dbd3fcd
commit aa3b65d1e2
2 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,9 @@ module Gnucash
# _String_: The name of the account (unqualified)
attr_reader :name
# _String_: The account description
attr_reader :description
# _String_: The account type (such as "EXPENSE")
attr_reader :type
@ -26,6 +29,7 @@ module Gnucash
@node = node
@name = node.xpath('act:name').text
@type = node.xpath('act:type').text
@description = node.xpath('act:description').text
@id = node.xpath('act:id').text
@parent_id = node.xpath('act:parent').text
@parent_id = nil if @parent_id == ""

View File

@ -13,6 +13,10 @@ module Gnucash
@salary.name.should == "Salary"
end
it "gives access to the account description" do
@checking.description.should == "Checking Account"
end
it "gives access to the fully-qualified account name" do
@checking.full_name.should == "Assets::Current Assets::Checking Account"
end