Class: MarkdownExec::TestHashDelegatorUpdateMenuAttribYieldSelectedWithBody

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

Overview

end

Instance Method Summary collapse

Instance Method Details

#setupObject



5082
5083
5084
5085
5086
5087
5088
5089
# File 'lib/hash_delegator.rb', line 5082

def setup
  @hd = HashDelegator.new
  @fcb = mock('Fcb')
  @fcb.stubs(:body).returns(true)
  HashDelegator.stubs(:initialize_fcb_names)
  HashDelegator.stubs(:default_block_title_from_body)
  Filter.stubs(:yield_to_block_if_applicable)
end

#test_update_menu_attrib_yield_selected_with_bodyObject



5091
5092
5093
5094
5095
5096
5097
5098
5099
# File 'lib/hash_delegator.rb', line 5091

def test_update_menu_attrib_yield_selected_with_body
  HashDelegator.expects(:initialize_fcb_names).with(@fcb)
  HashDelegator.expects(:default_block_title_from_body).with(@fcb)
  Filter.expects(:yield_to_block_if_applicable).with(@fcb, [:some_message],
                                                     {})

  HashDelegator.update_menu_attrib_yield_selected(fcb: @fcb,
                                                  messages: [:some_message])
end

#test_update_menu_attrib_yield_selected_without_bodyObject



5101
5102
5103
5104
5105
5106
# File 'lib/hash_delegator.rb', line 5101

def test_update_menu_attrib_yield_selected_without_body
  @fcb.stubs(:body).returns(nil)
  HashDelegator.expects(:initialize_fcb_names).with(@fcb)
  HashDelegator.update_menu_attrib_yield_selected(fcb: @fcb,
                                                  messages: [:some_message])
end