Permalink
Browse files

Shortcut for Flipper::DSL.new

  • Loading branch information...
1 parent a9ec907 commit 1df7ff353b346b4bf526a08c31c19658bfdeb775 @jnunemaker committed Aug 2, 2012
Showing with 11 additions and 0 deletions.
  1. +4 −0 lib/flipper.rb
  2. +7 −0 spec/flipper_spec.rb
View
@@ -7,6 +7,10 @@
require 'flipper/type'
module Flipper
+ def self.new(*args)
+ DSL.new(*args)
+ end
+
def self.groups
@groups ||= Registry.new
end
View
@@ -1,6 +1,13 @@
require 'helper'
describe Flipper do
+ describe ".new" do
+ it "returns new instance of dsl" do
+ instance = Flipper.new(double('Adapter'))
+ instance.should be_instance_of(Flipper::DSL)
+ end
+ end
+
describe ".groups" do
it "returns a registry instance" do
Flipper.groups.should be_instance_of(Flipper::Registry)

0 comments on commit 1df7ff3

Please sign in to comment.