diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-18 09:33:26 -0800 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-18 09:33:26 -0800 |
commit | 581ba1d946d7b5c868fd32dd9e81871a7c88763c (patch) | |
tree | 7cfd68b7e7c3815ba730027a31662a31b4465861 /activemodel/test/cases/validations/inclusion_validation_test.rb | |
parent | d4119e144a67e19cdf5d742caaf7d7647ebcb633 (diff) | |
parent | 0e2156d33431d2343dca57c54d8ccb3d558dff95 (diff) | |
download | rails-581ba1d946d7b5c868fd32dd9e81871a7c88763c.tar.gz rails-581ba1d946d7b5c868fd32dd9e81871a7c88763c.tar.bz2 rails-581ba1d946d7b5c868fd32dd9e81871a7c88763c.zip |
Merge pull request #3681 from sikachu/fix_test_variable
Update variable's name in the test case to reflect the class we're testing
Diffstat (limited to 'activemodel/test/cases/validations/inclusion_validation_test.rb')
-rw-r--r-- | activemodel/test/cases/validations/inclusion_validation_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/test/cases/validations/inclusion_validation_test.rb b/activemodel/test/cases/validations/inclusion_validation_test.rb index 413da92de4..851d345eab 100644 --- a/activemodel/test/cases/validations/inclusion_validation_test.rb +++ b/activemodel/test/cases/validations/inclusion_validation_test.rb @@ -78,12 +78,12 @@ class InclusionValidationTest < ActiveModel::TestCase def test_validates_inclusion_of_with_lambda Topic.validates_inclusion_of :title, :in => lambda{ |topic| topic.author_name == "sikachu" ? %w( monkey elephant ) : %w( abe wasabi ) } - p = Topic.new - p.title = "wasabi" - p.author_name = "sikachu" - assert p.invalid? + t = Topic.new + t.title = "wasabi" + t.author_name = "sikachu" + assert t.invalid? - p.title = "elephant" - assert p.valid? + t.title = "elephant" + assert t.valid? end end |