Sha256: 74555add586475dce41a2e6e114e5d4f1be2a487e5d0bfa4168c834fcca5e3a9
Contents?: true
Size: 772 Bytes
Versions: 13
Compression:
Stored size: 772 Bytes
Contents
class FinancialReportPage < PageModels::Base def initialize(txn_type, year) @txn_type = txn_type.parameterize @year = year end def url financial_report_path(:txn_type => @txn_type, :year => @year) end def verify! should have_content "Acme Financial Report for #{@year}" end def verify_transactions(txns) rows = all("#report .transaction") rows.should have(txns.size).things txns.each_with_index do |txn, i| rows[i].find(".type").should have_content txn["type"] rows[i].find(".amount").should have_content txn["amount"] end end def verify_no_transactions should have_content "There are no #{@txn_type} transactions for #{@year}" all("#report .transaction").should be_empty end end
Version data entries
13 entries across 13 versions & 1 rubygems