Class: SchemaExpectations::RSpecMatchers::Base
- Inherits:
-
Object
- Object
- SchemaExpectations::RSpecMatchers::Base
- Defined in:
- lib/schema_expectations/rspec_matchers/base.rb
Direct Known Subclasses
ValidateSchemaNullableMatcher, ValidateSchemaUniquenessMatcher
Instance Method Summary collapse
-
#except(*args) ⇒ Object
Specifies a list of columns for matcher to ignore.
-
#only(*args) ⇒ Object
Specifies a list of columns to restrict matcher.
Instance Method Details
#except(*args) ⇒ Object
Specifies a list of columns for matcher to ignore
21 22 23 24 25 26 |
# File 'lib/schema_expectations/rspec_matchers/base.rb', line 21 def except(*args) fail 'cannot use only and except' if @only @except = Array(args) fail 'empty except list' if @except.empty? self end |
#only(*args) ⇒ Object
Specifies a list of columns to restrict matcher
11 12 13 14 15 16 |
# File 'lib/schema_expectations/rspec_matchers/base.rb', line 11 def only(*args) fail 'cannot use only and except' if @except @only = Array(args) fail 'empty only list' if @only.empty? self end |