Sha256: c79ae051e2f6a0da9a95590117c3e5c9e697c0163104f3443be01d1c13d9c2fd

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 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.defined_group_flags.create(flaggable_type: "User", group_name: "foo_users") }

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

    it "sets the feature on the user" do
      user.detour_features.should include feature
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
detour-0.0.15 spec/integration/group_rollout_spec.rb
detour-0.0.14 spec/integration/group_rollout_spec.rb