Class: MarkdownExec::TestHashDelegatorUpdateMenuAttribYieldSelectedWithBody

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

Instance Method Summary collapse

Instance Method Details

#setupObject



3105
3106
3107
3108
3109
3110
3111
3112
# File 'lib/hash_delegator.rb', line 3105

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



3114
3115
3116
3117
3118
3119
3120
# File 'lib/hash_delegator.rb', line 3114

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



3122
3123
3124
3125
3126
# File 'lib/hash_delegator.rb', line 3122

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