Skip to content

Commit c421870

Browse files
committed
Merge pull request rails#4644 from ask4prasath/refactor_test
Replaced unwanted method and added to accessor for getter history
2 parents eee5a6c + bf31d7b commit c421870

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

activemodel/test/cases/validations/callbacks_test.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ class Dog
55
include ActiveModel::Validations
66
include ActiveModel::Validations::Callbacks
77

8-
attr_accessor :name
9-
attr_writer :history
8+
attr_accessor :name, :history
109

11-
def history
12-
@history ||= []
10+
def initialize
11+
@history = []
1312
end
1413
end
1514

0 commit comments

Comments
 (0)