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
2689 2690 2691 2692 2693 2694 2695 2696 |
# File 'lib/hash_delegator.rb', line 2689 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
2698 2699 2700 2701 2702 2703 |
# File 'lib/hash_delegator.rb', line 2698 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
2705 2706 2707 2708 2709 2710 2711 2712 |
# File 'lib/hash_delegator.rb', line 2705 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 |