lib/blueprints/helper.rb in blueprints-0.5.1 vs lib/blueprints/helper.rb in blueprints-0.6.0

- old
+ new

@@ -9,14 +9,24 @@ # # build :apple scenario with additional options # build :apple => {:color => 'red'} # # # options can also be passed for several blueprints # build :pear, :apple => {:color => 'red'}, :orange => {:color => 'orange'} - def build_plan(*names) - returning(Namespace.root.build(*names)) { Namespace.root.copy_ivars(self) } + def build_blueprint(*names) + Namespace.root.build(names, self, true) end - alias :build :build_plan + # Same as #build_blueprint except that you can use it to build same blueprint several times. + def build_blueprint!(*names) + Namespace.root.build(names, self, false) + end + + def build_attributes(name) + Namespace.root[name].attributes + end + + alias :build :build_blueprint + alias :build! :build_blueprint! # Clears all tables in database. You can pass table names to clear only those tables. You can also pass <tt>:undo</tt> option # to remove scenarios from built scenarios cache. # # TODO: add sample usage