Sha256: db71c01e1012a75c7fa7d87b008cf8e42c70b44089f0aa6cd931e09fd736beb8

Contents?: true

Size: 1.63 KB

Versions: 7

Compression:

Stored size: 1.63 KB

Contents

Feature: Configuring output
  Scenario: Setting a (max? or specific?) width for all columns
  Scenario: Setting a specific width for an individual column
    Given a class named Blog

    Given Blog has attributes title, author

    When I instantiate a Blog with {:title => "post!", :author => 'Ryan'}
    And table_print Blog, {:include => {:author => {:width => 10}}}
    Then the output should contain
    """
    TITLE | AUTHOR    
    ------------------
    post! | Ryan
    """
  Scenario: Specifying configuration on a per-object basis
    Given a class named Blog

    Given Blog has attributes title, author

    When I instantiate a Blog with {:title => "post!", :author => 'Ryan'}
    And configure Blog with :title
    And table_print Blog
    Then the output should contain
    """
    TITLE
    -----
    post!
    """
  Scenario: Specifying configuration on a per-object basis with an included column
    Given a class named Blog

    Given Blog has attributes title, author

    When I instantiate a Blog with {:title => "post!", :author => 'Ryan'}
    And configure Blog with {:include => {:foobar => lambda{|b| b.title}}}
    And table_print Blog
    Then the output should contain
    """
    TITLE | AUTHOR | FOOBAR
    -----------------------
    post! | Ryan   | post!
    """
  Scenario: Applying a formatter
  Scenario: Setting a column name
    Given a class named Blog

    Given Blog has attributes title, author

    When I instantiate a Blog with {:title => "post!", :author => 'Ryan'}
    And table_print Blog, {:wombat => {:display_method => :author}}
    Then the output should contain
    """
    WOMBAT
    ------
    Ryan
    """

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
table_print-1.1.3 features/configuring_output.feature
table_print-1.1.2 features/configuring_output.feature
table_print-1.1.1 features/configuring_output.feature
table_print-1.1.0 features/configuring_output.feature
table_print-1.0.1 features/configuring_output.feature
table_print-1.0.0 features/configuring_output.feature
table_print-1.0.0.rc3 features/configuring_output.feature