Class: MarkdownExec::TestHashDelegatorUpdateMenuAttribYieldSelectedWithBody

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

Instance Method Summary collapse

Instance Method Details

#setupObject



3317
3318
3319
3320
3321
3322
3323
3324
# File 'lib/hash_delegator.rb', line 3317

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



3326
3327
3328
3329
3330
3331
3332
# File 'lib/hash_delegator.rb', line 3326

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



3334
3335
3336
3337
3338
# File 'lib/hash_delegator.rb', line 3334

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