Class: RspecTableFormatter::Configurations

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rspec_table_formatter/configurations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfigurations

Returns a new instance of Configurations.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rspec_table_formatter/configurations.rb', line 11

def initialize
  # messages to be displayed in the status column
  @passed_message = '✔️  Passed'
  @failed_message = '❌ Failed'
  @pending_message = '⚠️ Test case pending'

  # headers for the table
  @test_case_header = 'Test Case'
  @expected_result_header = 'Expected result'
  @status_header = 'Status'

  # table style
  @table_style = { border_left: false, border_right: false, border: :markdown }
end

Instance Attribute Details

#expected_result_headerObject

Returns the value of attribute expected_result_header.



7
8
9
# File 'lib/rspec_table_formatter/configurations.rb', line 7

def expected_result_header
  @expected_result_header
end

#failed_messageObject

Returns the value of attribute failed_message.



7
8
9
# File 'lib/rspec_table_formatter/configurations.rb', line 7

def failed_message
  @failed_message
end

#passed_messageObject

Returns the value of attribute passed_message.



7
8
9
# File 'lib/rspec_table_formatter/configurations.rb', line 7

def passed_message
  @passed_message
end

#pending_messageObject

Returns the value of attribute pending_message.



7
8
9
# File 'lib/rspec_table_formatter/configurations.rb', line 7

def pending_message
  @pending_message
end

#status_headerObject

Returns the value of attribute status_header.



7
8
9
# File 'lib/rspec_table_formatter/configurations.rb', line 7

def status_header
  @status_header
end

#table_styleObject

Returns the value of attribute table_style.



7
8
9
# File 'lib/rspec_table_formatter/configurations.rb', line 7

def table_style
  @table_style
end

#test_case_headerObject

Returns the value of attribute test_case_header.



7
8
9
# File 'lib/rspec_table_formatter/configurations.rb', line 7

def test_case_header
  @test_case_header
end

Instance Method Details

#headersObject



26
27
28
# File 'lib/rspec_table_formatter/configurations.rb', line 26

def headers
  [ test_case_header,  expected_result_header, status_header]
end