lib/mocktail/value/explanation.rb in mocktail-1.2.3 vs lib/mocktail/value/explanation.rb in mocktail-2.0.0
- old
+ new
@@ -1,9 +1,13 @@
module Mocktail
class Explanation
- attr_reader :reference, :message
+ extend T::Sig
+ attr_reader :reference
+
+ attr_reader :message
+
def initialize(reference, message)
@reference = reference
@message = message
end
@@ -11,19 +15,40 @@
self.class
end
end
class NoExplanation < Explanation
- end
+ attr_reader :reference
- class UnsatisfyingCallExplanation < Explanation
+ def initialize(reference, message)
+ @reference = reference
+ @message = message
+ end
end
class DoubleExplanation < Explanation
+ attr_reader :reference
+
+ def initialize(reference, message)
+ @reference = reference
+ @message = message
+ end
end
class ReplacedTypeExplanation < Explanation
+ attr_reader :reference
+
+ def initialize(reference, message)
+ @reference = reference
+ @message = message
+ end
end
class FakeMethodExplanation < Explanation
+ attr_reader :reference
+
+ def initialize(reference, message)
+ @reference = reference
+ @message = message
+ end
end
end