-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stub method shared tests #458
base: main
Are you sure you want to change the base?
Changes from 1 commit
c203058
36888e8
c455732
d2362c5
26de50e
6fe3702
fec664a
9c47db1
90570ec
32562f1
2e425af
0d024d4
44037fe
388c608
b8505d1
60036df
e9cfc66
eef3880
a84b186
adc1d2f
bffb23d
1180f77
ba0617b
6d3b047
0ea322e
6a0bbc3
060ebb7
1b5af22
fdc2e2b
620ff24
99ca183
aad1b3f
18c8c49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
... since it is now used for instance as well as class methods
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require File.expand_path('../stub_instance_method_shared_tests', __FILE__) | ||
require File.expand_path('../stub_method_shared_tests', __FILE__) | ||
|
||
class StubClassMethodDefinedOnModuleTest < Mocha::TestCase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
include StubInstanceMethodSharedTests | ||
include StubMethodSharedTests | ||
|
||
def method_owner | ||
@method_owner ||= Module.new | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require File.expand_path('../stub_instance_method_shared_tests', __FILE__) | ||
require File.expand_path('../stub_method_shared_tests', __FILE__) | ||
|
||
class StubInstanceMethodDefinedOnClassTest < Mocha::TestCase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
include StubInstanceMethodSharedTests | ||
include StubMethodSharedTests | ||
|
||
def method_owner | ||
@method_owner ||= Class.new | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require File.expand_path('../stub_instance_method_shared_tests', __FILE__) | ||
require File.expand_path('../stub_method_shared_tests', __FILE__) | ||
|
||
class StubInstanceMethodDefinedOnModuleTest < Mocha::TestCase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
include StubInstanceMethodSharedTests | ||
include StubMethodSharedTests | ||
|
||
def method_owner | ||
@method_owner ||= Module.new | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require File.expand_path('../stub_instance_method_shared_tests', __FILE__) | ||
require File.expand_path('../stub_method_shared_tests', __FILE__) | ||
|
||
class StubInstanceMethodDefinedOnObjectClassTest < Mocha::TestCase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
include StubInstanceMethodSharedTests | ||
include StubMethodSharedTests | ||
|
||
def method_owner | ||
Object | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require File.expand_path('../stub_instance_method_shared_tests', __FILE__) | ||
require File.expand_path('../stub_method_shared_tests', __FILE__) | ||
|
||
class StubInstanceMethodDefinedOnSingletonClassTest < Mocha::TestCase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
include StubInstanceMethodSharedTests | ||
include StubMethodSharedTests | ||
|
||
def method_owner | ||
stubbed_instance.singleton_class | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require File.expand_path('../stub_instance_method_shared_tests', __FILE__) | ||
require File.expand_path('../stub_method_shared_tests', __FILE__) | ||
|
||
class StubInstanceMethodDefinedOnSuperclassTest < Mocha::TestCase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
include StubInstanceMethodSharedTests | ||
include StubMethodSharedTests | ||
|
||
def method_owner | ||
@method_owner ||= Class.new | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
require File.expand_path('../stub_instance_method_shared_tests', __FILE__) | ||
require File.expand_path('../stub_method_shared_tests', __FILE__) | ||
|
||
unless Mocha::PRE_RUBY_V19 | ||
class StubMethodDefinedOnModuleAndAliasedTest < Mocha::TestCase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
include StubInstanceMethodSharedTests | ||
include StubMethodSharedTests | ||
|
||
def method_owner | ||
@method_owner ||= Module.new | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Covered by https://github.com/freerange/mocha/pull/458/files#diff-7dc8bf9e04a1c602370525dece735736R3