spec/proforma_spec.rb in proforma-1.0.0.pre.alpha vs spec/proforma_spec.rb in proforma-1.0.0

- old
+ new

@@ -43,13 +43,13 @@ title: 'User List', children: [ { type: 'DataTable', columns: [ - { header: 'ID Number', body: '$:id' }, - { header: 'First Name', body: '$:first' }, - { header: 'Last Name', body: '$:last' } + { header: 'ID Number', body: '$id' }, + { header: 'First Name', body: '$first' }, + { header: 'Last Name', body: '$last' } ] } ] } @@ -81,17 +81,17 @@ { type: 'Pane', columns: [ { lines: [ - { label: 'ID Number', value: '$:id' }, - { label: 'First Name', value: '$:first' } + { label: 'ID Number', value: '$id' }, + { label: 'First Name', value: '$first' } ] }, { lines: [ - { label: 'Last Name', value: '$:last' } + { label: 'Last Name', value: '$last' } ] } ] } ] @@ -159,13 +159,13 @@ { type: 'Separator' }, { type: 'Spacer' }, { type: 'DataTable', columns: [ - { header: 'ID Number', body: '$:id' }, - { header: 'First Name', body: '$:first' }, - { header: 'Last Name', body: '$:last' } + { header: 'ID Number', body: '$id' }, + { header: 'First Name', body: '$first' }, + { header: 'Last Name', body: '$last' } ] }, { type: 'Spacer' }, { type: 'Grouping', @@ -176,27 +176,27 @@ { type: 'Pane', columns: [ { lines: [ - { label: 'ID Number', value: '$:id' }, - { label: 'First Name', value: '$:first' } + { label: 'ID Number', value: '$id' }, + { label: 'First Name', value: '$first' } ] }, { lines: [ - { label: 'Last Name', value: '$:last' } + { label: 'Last Name', value: '$last' } ] } ] }, { type: 'DataTable', property: 'phone_numbers', columns: [ - { header: 'Type', body: '$:type' }, - { header: 'Number', body: '$:number' } + { header: 'Type', body: '$type' }, + { header: 'Number', body: '$number' } ] }, { type: 'Spacer' } ] } @@ -205,21 +205,10 @@ actual_documents = Proforma.render(data, template) expected_documents = [ Proforma::Document.new( - contents: "========================================\nSystem A\n=================="\ - "======================\n555 N. Michigan Ave.\nChicago, IL 55555\n"\ - "555-555-5555 ext. 5132\n========================================\nUSER"\ - " LIST\n----------------------------------------\n\nID Number, First Name,"\ - " Last Name\n1, Matt, Smith\n2, Katie, Rizzo\n3, Nathan, Nathanson\n\nUSER"\ - " DETAILS\n----------------------------------------\n\nID Number: "\ - "1\nFirst Name: Matt\nLast Name: Smith\nType, Number\nMobile, 444-333-2222"\ - "\nHome, 444-333-2222\n\nUSER DETAILS\n-----------------------------------"\ - "-----\n\nID Number: 2\nFirst Name: Katie\nLast Name: Rizzo\nType, Number\n"\ - "Fax, 888-777-6666\n\nUSER DETAILS\n----------------------------------"\ - "------\n\nID Number: 3\nFirst Name: Nathan\nLast Name: "\ - "Nathanson\nType, Number\n\n", + contents: fixture('bringing_it_all_together.txt'), extension: '.txt', title: 'User Report' ) ]