Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow feature listing. Because it will be useful for flipper-ui list and... #10

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/flipper/dsl.rb
Expand Up @@ -46,8 +46,6 @@ def actors(number)
Flipper::Types::PercentageOfActors.new(number)
end

private

def features
@features ||= {}
end
Expand Down
10 changes: 10 additions & 0 deletions spec/flipper/dsl_spec.rb
Expand Up @@ -170,4 +170,14 @@ def feature(name)
@result.value.should eq(17)
end
end

describe "#features" do
it "returns a list of features" do
subject[:search].enable
subject[:log].disable
subject[:metrics].enable subject.random(5)

subject.features.should have(3).features
end
end
end