Sha256: 184a748e168b3a6bfed6945222f5a6d1c2ca028f6c476c2570b5b59c8b8d54fb

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

require "spec_helper"

describe "group rollouts" do
  let(:user) { User.create(name: "foo") }
  let(:feature) { Detour::Feature.create(name: "foo") }
  let!(:flag) { feature.group_flags.create(flaggable_type: "User", group_name: "foo_users") }

  describe "creating a group rollout" do
    before do
      Detour::Feature.define_user_group "foo_users" do |user|
        user.name == "foo"
      end
    end

    it "sets the feature on the user" do
      feature.match_groups?(user).should be_true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
detour-0.0.1 spec/integration/group_rollout_spec.rb