Sha256: 7d347081f1924605c15ec7f37b963d4e5a47758ee80850268f385f86b66c81fa
Contents?: true
Size: 1.42 KB
Versions: 9
Compression:
Stored size: 1.42 KB
Contents
Feature: Printing structs Scenario: A simple array of structs Given an array of structs named data with |title | author | |First post! | Ryan | |Second post! | John | |Third post! | Peter | When I table_print data Then the output should contain """ TITLE | AUTHOR -------------|------- First post! | Ryan Second post! | John Third post! | Peter """ Scenario: A lambda column Given an array of structs named data with |title | author | |First post! | Ryan | |Second post! | John | |Third post! | Peter | When I table_print data, [:include => {:two => lambda{|hash| hash[:author]*2}}] Then the output should contain """ TITLE | AUTHOR | TWO -------------|--------|----------- First post! | Ryan | RyanRyan Second post! | John | JohnJohn Third post! | Peter | PeterPeter """ Scenario: A method on the object Given an array of structs named data with |title | author | |First post! | Ryan | |Second post! | John | |Third post! | Peter | When I table_print data, [:include => :size] Then the output should contain """ TITLE | AUTHOR | SIZE -------------|--------|----- First post! | Ryan | 2 Second post! | John | 2 Third post! | Peter | 2 """
Version data entries
9 entries across 9 versions & 1 rubygems