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



7152
7153
7154
7155
7156
7157
7158
7159
# File 'lib/hash_delegator.rb', line 7152

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



7161
7162
7163
7164
7165
7166
7167
7168
7169
# File 'lib/hash_delegator.rb', line 7161

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



7171
7172
7173
7174
7175
7176
# File 'lib/hash_delegator.rb', line 7171

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