File: module_methods_test.rb

package info (click to toggle)
ruby-mocha 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,656 kB
  • sloc: ruby: 12,304; javascript: 499; makefile: 14
file content (18 lines) | stat: -rw-r--r-- 454 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require File.expand_path('../../test_helper', __FILE__)
require 'mocha/object_methods'

class ModuleMethodsTest < Mocha::TestCase
  def setup
    @module = Module.new.extend(Mocha::ObjectMethods)
  end

  def test_should_use_stubba_module_method_for_module
    assert_equal Mocha::InstanceMethod, @module.stubba_method
  end

  def test_should_stub_self_for_module
    assert_equal @module, @module.stubba_object
  end
end