Sha256: 6ff12bae4c9820d6ffba439761f51dae385adb36a9047f5da4709626ddec9720

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

Feature: Render a well-formatted report
  In order to print a well-formatted report through WINPOS WP-800 printer
  I want to render the report with erb templates

  Scenario: create a titled report
    Given a ESC/POS template:
    """
    <%= @title %>
    """
    And a titled report:
    """
    class TitledReport < Rescpos::Report
      attr_reader :title, :str_template

      def initialize(title = '')
        @title = title
      end
    end
    @report = TitledReport.new('A report with a title')
    """
    When I render the titled report with the given template
    Then I will see "A report with a title"

  Scenario: render a titled report with a template
    Given "spec/reports" is a template directory
    And a titled report:
    """
    class TitledReport < Rescpos::Report
      attr_reader :title, :str_template

      def initialize(title = '')
        @title = title
      end
    end
    @report = TitledReport.new('A report with a title')
    """
    When I render the report
    Then I will see "A report with a title"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rescpos-0.0.9 features/render_report.feature
rescpos-0.0.8 features/render_report.feature
rescpos-0.0.7 features/render_report.feature
rescpos-0.0.6 features/render_report.feature
rescpos-0.0.5 features/render_report.feature
rescpos-0.0.3 features/render_report.feature
rescpos-0.0.2 features/render_report.feature
rescpos-0.0.1 features/render_report.feature