blob: 7665d5b35477cd59d273da8302f6bc5ce0d90e01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
require 'spec_helper'
describe Constraints::FeatureConstrainer do
describe '#matches' do
it 'calls Feature.enabled? with the correct arguments' do
gate = stub_feature_flag_gate("an object")
expect(Feature).to receive(:enabled?)
.with(:feature_name, gate, default_enabled: true)
described_class.new(:feature_name, gate, default_enabled: true).matches?(double('request'))
end
end
end
|