Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Cleaned up instance variable warnings #17

Merged
merged 1 commit into from about 1 year ago

2 participants

Ryan McGeary Francesco Rodríguez
Ryan McGeary
Collaborator

Since warnings were turned on in the test suite, I figured you might want them eliminated too.

Francesco Rodríguez frodsan merged commit b353bb1 into from February 26, 2013
Francesco Rodríguez frodsan closed this February 26, 2013
Francesco Rodríguez
Owner

Thanks! :heart: I knew about this situation, Im planning to extract all the ActiveModel Validations matchers to https://github.com/frodsan/minitest-activemodel and just make a dependency to it.

Ryan McGeary
Collaborator
Francesco Rodríguez
Owner

Any help is welcome :smile:, I'm not currently using mongoid in my projects, do you want me to add you as a mantainer? :heart:

Ryan McGeary
Collaborator
Francesco Rodríguez
Owner

Hey! I added you :heart: Thanks! I bootstrap some code for the extraction (https://github.com/frodsan/mongoid-minitest/tree/minitest_activemodel) ... I will add you to this repo https://github.com/frodsan/minitest-activemodel too. I put some issues about what is missing to complete the extraction. When we complete, I will release 1.0 :smile:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 27, 2013
Ryan McGeary Cleaned up instance variable warnings aedf088
This page is out of date. Refresh to see the latest.
1  lib/matchers/validations/format.rb
@@ -4,6 +4,7 @@ module Validations
4 4
       class ValidateFormatMatcher < HaveValidationMatcher
5 5
         def initialize field
6 6
           super field, :format
  7
+          @valid = @invalid = nil
7 8
         end
8 9
 
9 10
         def to_allow valid_value
1  lib/matchers/validations/length.rb
@@ -4,6 +4,7 @@ module Validations
4 4
       class ValidateLengthMatcher < HaveValidationMatcher
5 5
         def initialize(field)
6 6
           super(field, :length)
  7
+          @minimum =  @maximum = @within = nil
7 8
         end
8 9
 
9 10
         def with_minimum(value)
1  lib/matchers/validations/uniqueness.rb
@@ -4,6 +4,7 @@ module Validations
4 4
       class ValidateUniquenessMatcher < HaveValidationMatcher
5 5
         def initialize(field)
6 6
           super(field, :uniqueness)
  7
+          @case_insensitive = @scope = nil
7 8
         end
8 9
 
9 10
         def case_insensitive
1  lib/matchers/validations/validations.rb
@@ -5,6 +5,7 @@ class HaveValidationMatcher < Matcher
5 5
         def initialize(field, validation_type)
6 6
           @field = field.to_s
7 7
           @type = validation_type.to_s
  8
+          @expected_message = @expected_on = nil
8 9
         end
9 10
 
10 11
         def with_message(expected_message)
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.