Sha256: 1ad23733af07dda6bf1c201b164ff59cd6a397280f0a89a7a9474fcea2f4fb10

Contents?: true

Size: 758 Bytes

Versions: 8

Compression:

Stored size: 758 Bytes

Contents

require 'rspec/core'
require 'rspec-steps/stepwise'

if RSpec.configuration.respond_to? :alias_example_group_to
  RSpec.configuration.alias_example_group_to :steps, :stepwise => true
else
  module RSpec::Steps
    module DSL
      def steps(*args, &block)
        options =
          if args.last.is_a?(Hash)
            args.pop
          else
            {}
          end
        options[:stepwise] = true
        options[:caller] ||= caller
        args.push(options)

        describe(*args, &block)
      end
    end
  end

  [RSpec::Core::ExampleGroup, RSpec, self].each do |mod|
    mod.extend RSpec::Steps::DSL
  end
  Module::send(:include, RSpec::Steps::DSL)
end

RSpec::configure do |config|
  config.include(RSpecStepwise, :stepwise => true)
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rspec-steps-1.0.7 lib/rspec-steps/duckpunch/example-group.rb
rspec-steps-1.0.6 lib/rspec-steps/duckpunch/example-group.rb
rspec-steps-1.0.5 lib/rspec-steps/duckpunch/example-group.rb
rspec-steps-1.0.4 lib/rspec-steps/duckpunch/example-group.rb
rspec-steps-1.0.3 lib/rspec-steps/duckpunch/example-group.rb
rspec-steps-1.0.2 lib/rspec-steps/duckpunch/example-group.rb
rspec-steps-1.0.1 lib/rspec-steps/duckpunch/example-group.rb
rspec-steps-1.0.0 lib/rspec-steps/duckpunch/example-group.rb