Class: MarkdownExec::TestHashDelegator::TestHashDelegatorBlocksFromNestedFiles
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegator::TestHashDelegatorBlocksFromNestedFiles
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_blocks_from_nested_files ⇒ Object
- #test_blocks_from_nested_files_with_no_chrome ⇒ Object
Instance Method Details
#setup ⇒ Object
2747 2748 2749 2750 2751 2752 2753 2754 |
# File 'lib/hash_delegator.rb', line 2747 def setup @hd = HashDelegator.new @hd.stubs(:iter_blocks_from_nested_files).yields(:blocks, FCB.new) @hd.stubs(:get_block_summary).returns(FCB.new) @hd.stubs(:create_and_add_chrome_blocks) @hd.instance_variable_set(:@delegate_object, {}) HashDelegator.stubs(:error_handler) end |
#test_blocks_from_nested_files ⇒ Object
2756 2757 2758 2759 2760 2761 |
# File 'lib/hash_delegator.rb', line 2756 def test_blocks_from_nested_files result = @hd.blocks_from_nested_files assert_kind_of Array, result assert_kind_of FCB, result.first end |
#test_blocks_from_nested_files_with_no_chrome ⇒ Object
2763 2764 2765 2766 2767 2768 2769 2770 |
# File 'lib/hash_delegator.rb', line 2763 def test_blocks_from_nested_files_with_no_chrome @hd.instance_variable_set(:@delegate_object, { no_chrome: true }) @hd.expects(:create_and_add_chrome_blocks).never result = @hd.blocks_from_nested_files assert_kind_of Array, result end |