Sha256: 54ad482bc4e8e9716b727550250629865016f41de275acc33c170adad6c878de
Contents?: true
Size: 1.78 KB
Versions: 2
Compression:
Stored size: 1.78 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 Ryan Ryan Ryan Ryan Ryan Ryan Ryan Ryan Ryan Ryan Ryan Ryan'} And table_print Blog, {:include => {:author => {:width => 40}}} Then the output should contain """ TITLE | AUTHOR ------------------------------------------------ post! | Ryan Ryan Ryan Ryan Ryan Ryan Ryan Ry... """ 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
table_print-1.1.5 | features/configuring_output.feature |
table_print-1.1.4 | features/configuring_output.feature |