Sha256: cbc631eb97579caed3b96099ca6e8dd31aee118002318b8b2d45602daa1017c3

Contents?: true

Size: 673 Bytes

Versions: 3

Compression:

Stored size: 673 Bytes

Contents

module DescribeHelper
  # Creates new before filter that builds blueprints before each spec.
  def build_blueprint(*names)
    before { build_blueprint *names }
  end

  # Same as #build_blueprint except that you can use it to build same blueprint several times.
  def build_blueprint!(*names)
    before { build_blueprint! *names }
  end

  alias :build :build_blueprint
  alias :build! :build_blueprint!
end

config_class = defined?(RSpec) ? RSpec : Spec::Runner
config_class.configure do |config|
  config.include(Blueprints::Helper)
  config.extend(DescribeHelper)
  config.before do
    Blueprints.setup(self)
  end
  config.after do
    Blueprints.teardown
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blueprints-0.8.2 lib/blueprints/extensions/rspec.rb
blueprints-0.8.1 lib/blueprints/extensions/rspec.rb
blueprints-0.8.0 lib/blueprints/extensions/rspec.rb