We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 308ef86 commit fc8253aCopy full SHA for fc8253a
lib/liquid-rails/rspec/drop_matchers.rb
@@ -71,6 +71,7 @@ def matches?(actual)
71
72
association = associations[name]
73
result = association.present? && association[:type] == options[:type]
74
+ result = result && association[:options][:scope] == options[:scope] if options[:scope]
75
result = result && association[:options][:with] == options[:with] if options[:with]
76
result = result && association[:options][:class_name] == options[:class_name] if options[:class_name]
77
@@ -82,6 +83,11 @@ def with(class_name)
82
83
self
84
end
85
86
+ def scope(scope_name)
87
+ @options[:scope] = scope_name
88
+ self
89
+ end
90
+
91
def class_name(class_name)
92
@options[:class_name] = class_name
93
0 commit comments