File: excluding_columns.feature

package info (click to toggle)
ruby-table-print 1.5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 296 kB
  • sloc: ruby: 1,823; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Feature: Excluding columns
  Scenario: With the :except option
    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, {:except => :title}
    Then the output should contain
    """
    AUTHOR
    ------
    Ryan
    """

  Scenario: By specifying columns
    Given a class named Blog

    Given Blog has attributes title, author, url

    When I instantiate a Blog with {:title => "post!", :author => 'Ryan', :url => "http://google.com"}
    And table_print Blog, [:author, :url]
    Then the output should contain
    """
    AUTHOR | URL              
    -------|------------------
    Ryan   | http://google.com
    """