Sha256: e076f3f50d807ef216b702fe86c0f03de90ec611b6c04daecbb823a750396d87
Contents?: true
Size: 492 Bytes
Versions: 9
Compression:
Stored size: 492 Bytes
Contents
require "spec_helper" describe "percentage rollouts" do let(:users) { 10.times.collect { User.create } } let(:feature) { Detour::Feature.create(name: "foo") } let!(:flag) { feature.percentage_flags.create(flaggable_type: "User", percentage: 20) } describe "creating a percentage rollout" do it "makes the feature available to the given percentage of instances" do users.select { |user| feature.match_percentage?(user) }.length.should eq users.length / 5 end end end
Version data entries
9 entries across 9 versions & 1 rubygems