Skip to content

Commit

Permalink
rename shared test mod to move related files closer
Browse files Browse the repository at this point in the history
  • Loading branch information
nitishr committed Jan 16, 2020
1 parent dae2123 commit 79558ac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.expand_path('../acceptance_test_helper', __FILE__)

module AllowStubbingExistingMethodSharedTests
module StubbingExistingMethodIsAllowedSharedTests
include AcceptanceTest

def setup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../stubbing_with_potential_violation_shared_tests', __FILE__)
require File.expand_path('../allow_stubbing_existing_method_shared_tests', __FILE__)
require File.expand_path('../stubbing_existing_method_is_allowed_shared_tests', __FILE__)

class StubbingNonExistentAnyInstanceMethodTest < Mocha::TestCase
include StubbingWithPotentialViolationDefaultingToAllowedSharedTests
Expand All @@ -22,8 +22,8 @@ def message_on_violation
end
end

class AllowStubbingExistingAnyInstanceMethodTest < Mocha::TestCase
include AllowStubbingExistingMethodSharedTests
class StubbingExistingAnyInstanceMethodIsAllowedTest < Mocha::TestCase
include StubbingExistingMethodIsAllowedSharedTests

def method_owner
stubbed_instance
Expand Down Expand Up @@ -54,8 +54,8 @@ def respond_to?(method, _include_private = false)
end
end

class AllowStubbingExistingAnyInstanceSuperclassMethodTest < Mocha::TestCase
include AllowStubbingExistingMethodSharedTests
class StubbingExistingAnyInstanceSuperclassMethodIsAllowedTest < Mocha::TestCase
include StubbingExistingMethodIsAllowedSharedTests

def method_owner
stubbed_instance.superclass
Expand Down
10 changes: 5 additions & 5 deletions test/acceptance/stubbing_non_existent_class_method_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../stubbing_with_potential_violation_shared_tests', __FILE__)
require File.expand_path('../allow_stubbing_existing_method_shared_tests', __FILE__)
require File.expand_path('../stubbing_existing_method_is_allowed_shared_tests', __FILE__)

class StubbingNonExistentClassMethodTest < Mocha::TestCase
include StubbingWithPotentialViolationDefaultingToAllowedSharedTests
Expand All @@ -22,8 +22,8 @@ def message_on_violation
end
end

class AllowStubbingExistingClassMethodTest < Mocha::TestCase
include AllowStubbingExistingMethodSharedTests
class StubbingExistingClassMethodIsAllowedTest < Mocha::TestCase
include StubbingExistingMethodIsAllowedSharedTests

def method_owner
stub_owner.singleton_class
Expand All @@ -34,8 +34,8 @@ def stub_owner
end
end

class AllowStubbingExistingSuperclassMethodTest < Mocha::TestCase
include AllowStubbingExistingMethodSharedTests
class StubbingExistingSuperclassMethodIsAllowedTest < Mocha::TestCase
include StubbingExistingMethodIsAllowedSharedTests

def method_owner
stub_owner.superclass.singleton_class
Expand Down
10 changes: 5 additions & 5 deletions test/acceptance/stubbing_non_existent_instance_method_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../stubbing_with_potential_violation_shared_tests', __FILE__)
require File.expand_path('../allow_stubbing_existing_method_shared_tests', __FILE__)
require File.expand_path('../stubbing_existing_method_is_allowed_shared_tests', __FILE__)

class StubbingNonExistentInstanceMethodTest < Mocha::TestCase
include StubbingWithPotentialViolationDefaultingToAllowedSharedTests
Expand All @@ -22,8 +22,8 @@ def message_on_violation
end
end

class AllowStubbingExistingInstanceMethodTest < Mocha::TestCase
include AllowStubbingExistingMethodSharedTests
class StubbingExistingInstanceMethodIsAllowedTest < Mocha::TestCase
include StubbingExistingMethodIsAllowedSharedTests

def method_owner
stub_owner.class
Expand All @@ -34,8 +34,8 @@ def stub_owner
end
end

class AllowStubbingExistingInstanceSuperclassMethodTest < Mocha::TestCase
include AllowStubbingExistingMethodSharedTests
class StubbingExistingInstanceSuperclassMethodIsAllowedTest < Mocha::TestCase
include StubbingExistingMethodIsAllowedSharedTests

def method_owner
stub_owner.class.superclass
Expand Down

0 comments on commit 79558ac

Please sign in to comment.