summaryrefslogtreecommitdiff
path: root/spec/lib/constraints/feature_constrainer_spec.rb
blob: 42efc164f81211ce9b94d81f851ad27f12d94568 (plain)
1
2
3
4
5
6
7
8
9
10
11
require 'spec_helper'

describe Constraints::FeatureConstrainer do
  describe '#matches' do
    it 'calls Feature.enabled? with the correct arguments' do
      expect(Feature).to receive(:enabled?).with(:feature_name, "an object", default_enabled: true)

      described_class.new(:feature_name, "an object", default_enabled: true).matches?(double('request'))
    end
  end
end