Class: MarkdownExec::TestHashDelegatorBlocksFromNestedFiles

Inherits:
Minitest::Test
  • Object
show all
Defined in:
lib/hash_delegator.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



6496
6497
6498
6499
6500
6501
# File 'lib/hash_delegator.rb', line 6496

def setup
  @hd = HashDelegator.new
  @hd.stubs(:iter_blocks_from_nested_files).yields(:blocks, FCB.new)
  @hd.stubs(:create_and_add_chrome_blocks)
  HashDelegator.stubs(:error_handler)
end

#test_blocks_from_nested_filesObject



6503
6504
6505
6506
6507
# File 'lib/hash_delegator.rb', line 6503

def test_blocks_from_nested_files
  result = @hd.blocks_from_nested_files.blocks
  assert_kind_of Array, result
  assert_kind_of FCB, result.first
end

#test_blocks_from_nested_files_with_no_chromeObject



6509
6510
6511
6512
6513
6514
6515
6516
# File 'lib/hash_delegator.rb', line 6509

def test_blocks_from_nested_files_with_no_chrome
  @hd = HashDelegator.new(no_chrome: true)
  @hd.expects(:create_and_add_chrome_blocks).never

  result = @hd.blocks_from_nested_files.blocks

  assert_kind_of Array, result
end