Skip to content

Commit

Permalink
Undoing changes to file imports to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vsppedro committed Aug 24, 2020
1 parent 842e287 commit 50bfe11
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/shoulda/matchers/action_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'shoulda/matchers/action_controller/respond_with_matcher'
require 'shoulda/matchers/action_controller/route_matcher'

module Shoulda
Expand All @@ -13,7 +14,6 @@ module ActionController
autoload :RenderTemplateMatcher, 'shoulda/matchers/action_controller/render_template_matcher'
autoload :RenderWithLayoutMatcher, 'shoulda/matchers/action_controller/render_with_layout_matcher'
autoload :RescueFromMatcher, 'shoulda/matchers/action_controller/rescue_from_matcher'
autoload :RespondWithMatcher, 'shoulda/matchers/action_controller/respond_with_matcher'
autoload :RouteParams, 'shoulda/matchers/action_controller/route_params'
autoload :SessionStore, 'shoulda/matchers/action_controller/session_store'
autoload :SetFlashMatcher, 'shoulda/matchers/action_controller/set_flash_matcher'
Expand Down
13 changes: 7 additions & 6 deletions lib/shoulda/matchers/active_model.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
require 'shoulda/matchers/active_model/allow_mass_assignment_of_matcher'
require 'shoulda/matchers/active_model/helpers'
require 'shoulda/matchers/active_model/qualifiers'
require 'shoulda/matchers/active_model/validation_matcher'
require 'shoulda/matchers/active_model/validate_absence_of_matcher'
require 'shoulda/matchers/active_model/validate_presence_of_matcher'

module Shoulda
module Matchers
# This module provides matchers that are used to test behavior within
Expand Down Expand Up @@ -57,25 +64,19 @@ module Matchers
# end
#
module ActiveModel
autoload :AllowMassAssignmentOfMatcher, 'shoulda/matchers/active_model/allow_mass_assignment_of_matcher'
autoload :AllowValueMatcher, 'shoulda/matchers/active_model/allow_value_matcher'
autoload :CouldNotDetermineValueOutsideOfArray, 'shoulda/matchers/active_model/errors'
autoload :CouldNotSetPasswordError, 'shoulda/matchers/active_model/errors'
autoload :DisallowValueMatcher, 'shoulda/matchers/active_model/disallow_value_matcher'
autoload :HaveSecurePasswordMatcher, 'shoulda/matchers/active_model/have_secure_password_matcher'
autoload :Helpers, 'shoulda/matchers/active_model/helpers'
autoload :NonNullableBooleanError, 'shoulda/matchers/active_model/errors'
autoload :NumericalityMatchers, 'shoulda/matchers/active_model/numericality_matchers'
autoload :Qualifiers, 'shoulda/matchers/active_model/qualifiers'
autoload :ValidateAbsenceOfMatcher, 'shoulda/matchers/active_model/validate_absence_of_matcher'
autoload :ValidateAcceptanceOfMatcher, 'shoulda/matchers/active_model/validate_acceptance_of_matcher'
autoload :ValidateConfirmationOfMatcher, 'shoulda/matchers/active_model/validate_confirmation_of_matcher'
autoload :ValidateExclusionOfMatcher, 'shoulda/matchers/active_model/validate_exclusion_of_matcher'
autoload :ValidateInclusionOfMatcher, 'shoulda/matchers/active_model/validate_inclusion_of_matcher'
autoload :ValidateLengthOfMatcher, 'shoulda/matchers/active_model/validate_length_of_matcher'
autoload :ValidateNumericalityOfMatcher, 'shoulda/matchers/active_model/validate_numericality_of_matcher'
autoload :ValidatePresenceOfMatcher, 'shoulda/matchers/active_model/validate_presence_of_matcher'
autoload :ValidationMatcher, 'shoulda/matchers/active_model/validation_matcher'
autoload :Validator, 'shoulda/matchers/active_model/validator'
end
end
Expand Down
3 changes: 2 additions & 1 deletion lib/shoulda/matchers/active_record.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "shoulda/matchers/active_record/validate_uniqueness_of_matcher"

module Shoulda
module Matchers
# This module provides matchers that are used to test behavior within
Expand All @@ -16,7 +18,6 @@ module ActiveRecord
autoload :HaveSecureTokenMatcher, 'shoulda/matchers/active_record/have_secure_token_matcher'
autoload :SerializeMatcher, 'shoulda/matchers/active_record/serialize_matcher'
autoload :Uniqueness, 'shoulda/matchers/active_record/uniqueness'
autoload :ValidateUniquenessOfMatcher, 'shoulda/matchers/active_record/validate_uniqueness_of_matcher'
end
end
end
2 changes: 1 addition & 1 deletion lib/shoulda/matchers/doublespeak.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module Doublespeak
autoload :MethodCall, 'shoulda/matchers/doublespeak/method_call'
autoload :ObjectDouble, 'shoulda/matchers/doublespeak/object_double'
autoload :ProxyImplementation, 'shoulda/matchers/doublespeak/proxy_implementation'
autoload :StubImplementation, 'shoulda/matchers/doublespeak/stub_implementation'
autoload :World, 'shoulda/matchers/doublespeak/world'

class << self
Expand All @@ -37,3 +36,4 @@ def debug(&block)
end
end

require 'shoulda/matchers/doublespeak/stub_implementation'
3 changes: 2 additions & 1 deletion lib/shoulda/matchers/independent.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
require 'shoulda/matchers/independent/delegate_method_matcher'

module Shoulda
module Matchers
# This module provides matchers that are used to test behavior outside of
# Rails-specific classes.
module Independent
autoload :DelegateMethodMatcher, 'shoulda/matchers/independent/delegate_method_matcher'
end
end
end
3 changes: 3 additions & 0 deletions lib/shoulda/matchers/independent/delegate_method_matcher.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
require 'shoulda/matchers/doublespeak'
require 'shoulda/matchers/matcher_context'

module Shoulda
module Matchers
module Independent
Expand Down
1 change: 1 addition & 0 deletions lib/shoulda/matchers/integrations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ def test_framework_registry
end
end

require 'shoulda/matchers/integrations/libraries'
require 'shoulda/matchers/integrations/test_frameworks'
2 changes: 0 additions & 2 deletions lib/shoulda/matchers/integrations/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@ def find_class!(name)
end
end
end

require 'shoulda/matchers/integrations/libraries'
2 changes: 2 additions & 0 deletions lib/shoulda/matchers/integrations/test_frameworks.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'shoulda/matchers/integrations/test_frameworks/minitest_4'
require 'shoulda/matchers/integrations/test_frameworks/minitest_5'
require 'shoulda/matchers/integrations/test_frameworks/missing_test_framework'
require 'shoulda/matchers/integrations/test_frameworks/rspec'

Expand Down

0 comments on commit 50bfe11

Please sign in to comment.