1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Prefer protected over private attributes

This commit is contained in:
Sergey Kuchmistov 2014-06-24 18:57:52 +03:00 committed by Elliot Winkler
parent 2a7389ef69
commit 198570db2c
24 changed files with 24 additions and 24 deletions

View file

@ -180,7 +180,7 @@ module Shoulda
"have :#{method_name} as a #{kind}_#{callback_type}" "have :#{method_name} as a #{kind}_#{callback_type}"
end end
private protected
def callbacks def callbacks
controller_class._process_action_callbacks.select do |callback| controller_class._process_action_callbacks.select do |callback|

View file

@ -67,7 +67,7 @@ module Shoulda
end end
alias failure_message_for_should_not failure_message_when_negated alias failure_message_for_should_not failure_message_when_negated
private protected
attr_reader :controller, :exception, :expected_method, :handlers attr_reader :controller, :exception, :expected_method, :handlers

View file

@ -15,7 +15,7 @@ module Shoulda
end end
end end
private protected
attr_reader :args attr_reader :args

View file

@ -206,7 +206,7 @@ module Shoulda
end end
alias failure_message_for_should_not failure_message_when_negated alias failure_message_for_should_not failure_message_when_negated
private protected
attr_reader :controller, :double_collection, :action, :verb, attr_reader :controller, :double_collection, :action, :verb,
:request_params, :expected_permitted_params, :context :request_params, :expected_permitted_params, :context

View file

@ -237,7 +237,7 @@ module Shoulda
message_finder.allow_description(allowed_values) message_finder.allow_description(allowed_values)
end end
private protected
attr_accessor :values_to_match, :message_finder_factory, attr_accessor :values_to_match, :message_finder_factory,
:instance, :attribute_to_set, :attribute_to_check_message_against, :instance, :attribute_to_set, :attribute_to_check_message_against,

View file

@ -46,7 +46,7 @@ module Shoulda
self self
end end
private protected
attr_reader :allow_matcher attr_reader :allow_matcher
end end

View file

@ -68,7 +68,7 @@ module Shoulda
failure.nil? failure.nil?
end end
private protected
attr_reader :subject attr_reader :subject

View file

@ -855,7 +855,7 @@ module Shoulda
submatchers_match? submatchers_match?
end end
private protected
attr_reader :submatchers, :missing, :subject, :macro, :name, :options attr_reader :submatchers, :missing, :subject, :macro, :name, :options

View file

@ -27,7 +27,7 @@ module Shoulda
end end
end end
private protected
attr_accessor :subject, :counter_cache, :name attr_accessor :subject, :counter_cache, :name

View file

@ -27,7 +27,7 @@ module Shoulda
end end
end end
private protected
attr_accessor :subject, :dependent, :name attr_accessor :subject, :dependent, :name

View file

@ -27,7 +27,7 @@ module Shoulda
end end
end end
private protected
attr_accessor :subject, :inverse_of, :name attr_accessor :subject, :inverse_of, :name

View file

@ -45,7 +45,7 @@ module Shoulda
end end
end end
private protected
attr_reader :reflection, :subject attr_reader :reflection, :subject

View file

@ -47,7 +47,7 @@ module Shoulda
end end
end end
private protected
attr_reader :subject, :name attr_reader :subject, :name

View file

@ -43,7 +43,7 @@ module Shoulda
end end
end end
private protected
attr_reader :reflector attr_reader :reflector

View file

@ -27,7 +27,7 @@ module Shoulda
end end
end end
private protected
attr_accessor :subject, :order, :name attr_accessor :subject, :order, :name

View file

@ -27,7 +27,7 @@ module Shoulda
end end
end end
private protected
attr_accessor :subject, :source, :name attr_accessor :subject, :source, :name

View file

@ -49,7 +49,7 @@ module Shoulda
end end
end end
private protected
attr_accessor :through, :name, :subject attr_accessor :through, :name, :subject

View file

@ -46,7 +46,7 @@ module Shoulda
end end
end end
private protected
attr_reader :klass, :method_name, :implementation, :original_method attr_reader :klass, :method_name, :implementation, :original_method

View file

@ -38,7 +38,7 @@ module Shoulda
end end
end end
private protected
attr_reader :klass, :doubles_by_method_name attr_reader :klass, :doubles_by_method_name

View file

@ -24,7 +24,7 @@ module Shoulda
nil nil
end end
private protected
attr_reader :calls_by_method_name attr_reader :calls_by_method_name
end end

View file

@ -22,7 +22,7 @@ module Shoulda
double.call_original_method(object, args, block) double.call_original_method(object, args, block)
end end
private protected
attr_reader :stub_implementation attr_reader :stub_implementation
end end

View file

@ -26,7 +26,7 @@ module Shoulda
implementation.call(object, args, block) implementation.call(object, args, block)
end end
private protected
attr_reader :implementation attr_reader :implementation
end end

View file

@ -171,7 +171,7 @@ module Shoulda
end end
alias failure_message_for_should_not failure_message_when_negated alias failure_message_for_should_not failure_message_when_negated
private protected
attr_reader \ attr_reader \
:delegated_arguments, :delegated_arguments,

View file

@ -17,7 +17,7 @@ module Shoulda
args == received_arguments args == received_arguments
end end
private protected
def stub_method(method) def stub_method(method)
class_eval do class_eval do