Class: MarkdownExec::TestHashDelegator::TestHashDelegatorDetermineBlockState
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegator::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
2838 2839 2840 2841 |
# File 'lib/hash_delegator.rb', line 2838 def setup @hd = HashDelegator.new @hd.stubs(:menu_chrome_formatted_option).returns('Formatted Option') end |
#test_determine_block_state_back ⇒ Object
2853 2854 2855 2856 2857 2858 2859 2860 |
# File 'lib/hash_delegator.rb', line 2853 def test_determine_block_state_back selected_option = { 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
2862 2863 2864 2865 2866 2867 2868 2869 |
# File 'lib/hash_delegator.rb', line 2862 def test_determine_block_state_continue selected_option = { 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
2843 2844 2845 2846 2847 2848 2849 2850 2851 |
# File 'lib/hash_delegator.rb', line 2843 def test_determine_block_state_exit selected_option = { 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 |