class MarkdownExec::FilterTest
def setup
def setup @options = {} @fcb = FCB.new( dname: nil, oname: nil ) end
def test_bash_only_condition_true
def test_bash_only_condition_true @options[:bash_only] = true @fcb[:shell] = BlockType::BASH assert Filter.fcb_select?(@options, @fcb) end
def test_default_case
def test_default_case assert Filter.fcb_select?(@options, @fcb) end
def test_exclude_expect_blocks_condition
def test_exclude_expect_blocks_condition @options[:exclude_expect_blocks] = true @fcb[:shell] = 'expect' refute Filter.fcb_select?(@options, @fcb) end
def test_hidden_name_condition
def test_hidden_name_condition @options[:hide_blocks_by_name] = true @options[:block_name_hidden_match] = 'hidden' @fcb[:oname] = 'hidden_block' refute Filter.fcb_select?(@options, @fcb) end
def test_include_name_condition
def test_include_name_condition @options[:hide_blocks_by_name] = true @options[:block_name_indlude_match] = 'include' @fcb[:oname] = 'include_block' assert Filter.fcb_select?(@options, @fcb) end
def test_name_select_condition
def test_name_select_condition @options[:select_by_name_regex] = 'select' @fcb[:oname] = 'select_this' assert Filter.fcb_select?(@options, @fcb) end
def test_no_chrome_condition
def test_no_chrome_condition @options[:no_chrome] = true @fcb[:chrome] = true refute Filter.fcb_select?(@options, @fcb) end
def test_shell_exclude_condition
def test_shell_exclude_condition @options[:exclude_by_shell_regex] = 'exclude_this' @fcb[:shell] = 'exclude_this_shell' refute Filter.fcb_select?(@options, @fcb) end
def test_shell_select_condition
def test_shell_select_condition @options[:select_by_shell_regex] = 'select_this' @fcb[:shell] = 'select_this_shell' assert Filter.fcb_select?(@options, @fcb) end
def test_wrap_name_condition
def test_wrap_name_condition @options[:hide_blocks_by_name] = true @options[:block_name_wrapper_match] = 'wrap' @fcb[:oname] = 'wrap_block' assert Filter.fcb_select?(@options, @fcb) end