Class: Remarkable::ActiveRecord::Matchers::IndexMatcher
- Inherits:
-
Matcher::Base
- Object
- Matcher::Base
- Remarkable::ActiveRecord::Matchers::IndexMatcher
- Defined in:
- lib/remarkable/active_record/macros/database/index_matcher.rb
Constant Summary collapse
- INDEX_TYPES =
{ true => "unique", false => "non-unique" }
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #negative_failure_message ⇒ Object
- #table_name=(table_name) ⇒ Object
Methods inherited from Matcher::Base
Methods included from Matcher::DSL
Instance Method Details
#description ⇒ Object
25 26 27 |
# File 'lib/remarkable/active_record/macros/database/index_matcher.rb', line 25 def description "have #{index_type} index on #{table_name} for #{@columns.inspect}" end |
#failure_message ⇒ Object
17 18 19 |
# File 'lib/remarkable/active_record/macros/database/index_matcher.rb', line 17 def "Expected to #{expectation} (#{@missing})" end |
#negative_failure_message ⇒ Object
21 22 23 |
# File 'lib/remarkable/active_record/macros/database/index_matcher.rb', line 21 def "Did not expect to #{expectation}" end |
#table_name=(table_name) ⇒ Object
13 14 15 |
# File 'lib/remarkable/active_record/macros/database/index_matcher.rb', line 13 def table_name=(table_name) @table_name = table_name end |