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
2633 2634 2635 2636 2637 2638 2639 2640 |
# File 'lib/hash_delegator.rb', line 2633 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
2642 2643 2644 2645 2646 2647 |
# File 'lib/hash_delegator.rb', line 2642 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
2649 2650 2651 2652 2653 2654 2655 2656 |
# File 'lib/hash_delegator.rb', line 2649 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 |