Class: MarkdownExec::TestHashDelegatorDetermineBlockState
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegatorDetermineBlockState
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_determine_block_state_back ⇒ Object
- #test_determine_block_state_continue ⇒ Object
- #test_determine_block_state_exit ⇒ Object
Instance Method Details
#setup ⇒ Object
6685 6686 6687 6688 |
# File 'lib/hash_delegator.rb', line 6685 def setup @hd = HashDelegator.new @hd.stubs(:menu_chrome_formatted_option).returns('Formatted Option') end |
#test_determine_block_state_back ⇒ Object
6701 6702 6703 6704 6705 6706 6707 6708 6709 |
# File 'lib/hash_delegator.rb', line 6701 def test_determine_block_state_back selected_option = FCB.new(oname: 'Formatted Back Option') @hd.stubs(:menu_chrome_formatted_option) .with(:menu_option_back_name).returns('Formatted Back Option') result = @hd.determine_block_state(selected_option) assert_equal MenuState::BACK, result.state assert_equal selected_option, result.block end |
#test_determine_block_state_continue ⇒ Object
6711 6712 6713 6714 6715 6716 6717 6718 |
# File 'lib/hash_delegator.rb', line 6711 def test_determine_block_state_continue selected_option = FCB.new(oname: 'Other Option') result = @hd.determine_block_state(selected_option) assert_equal MenuState::CONTINUE, result.state assert_equal selected_option, result.block end |
#test_determine_block_state_exit ⇒ Object
6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 |
# File 'lib/hash_delegator.rb', line 6690 def test_determine_block_state_exit selected_option = FCB.new(oname: 'Formatted Option') @hd.stubs(:menu_chrome_formatted_option) .with(:menu_option_exit_name).returns('Formatted Option') result = @hd.determine_block_state(selected_option) assert_equal MenuState::EXIT, result.state assert_nil result.block end |