aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman+no-recruiters@gmail.com>2018-07-25 16:00:33 -0500
committerGitHub <noreply@github.com>2018-07-25 16:00:33 -0500
commit91fd679710118482f718ea710710561f1cfb0b70 (patch)
tree9169aa6ea2315b16f77e530dd2c6a4eda1816769 /activemodel
parentab8847c92092a57df6433f4fc72682074359531f (diff)
parentd108288c2f684233298f97f18ac00de0b016deaa (diff)
downloadrails-91fd679710118482f718ea710710561f1cfb0b70.tar.gz
rails-91fd679710118482f718ea710710561f1cfb0b70.tar.bz2
rails-91fd679710118482f718ea710710561f1cfb0b70.zip
Merge pull request #32381 from q-centrix/update-codeclimate-configs
Turn on performance based cops
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/dirty_test.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/activemodel/test/cases/dirty_test.rb b/activemodel/test/cases/dirty_test.rb
index b120e68027..b38d84fff2 100644
--- a/activemodel/test/cases/dirty_test.rb
+++ b/activemodel/test/cases/dirty_test.rb
@@ -14,37 +14,23 @@ class DirtyTest < ActiveModel::TestCase
@status = "initialized"
end
- def name
- @name
- end
+ attr_reader :name, :color, :size, :status
def name=(val)
name_will_change!
@name = val
end
- def color
- @color
- end
-
def color=(val)
color_will_change! unless val == @color
@color = val
end
- def size
- @size
- end
-
def size=(val)
attribute_will_change!(:size) unless val == @size
@size = val
end
- def status
- @status
- end
-
def status=(val)
status_will_change! unless val == @status
@status = val