Sha256: 7f89cf0a5510add7350479ac8229ce1d7c37ababe28efc1c8ece7a4a9d04e918

Contents?: true

Size: 481 Bytes

Versions: 5

Compression:

Stored size: 481 Bytes

Contents

module RSpec::Rails::RDecoratorExampleGroup
  extend ActiveSupport::Concern
  include RSpec::Rails::RailsExampleGroup
  include ActionView::TestCase::Behavior

  included do
    metadata[:type] = :decorator

    before do
      RDecorator::ViewContext.current = controller.view_context
    end
  end
end

RSpec::configure do |c|
  c.include RSpec::Rails::RDecoratorExampleGroup, :type => :decorator, :example_group => {
    :file_path => c.escaped_path(%w[spec decorators])
  }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
r_decorator-0.0.7 lib/r_decorator/rspec.rb
r_decorator-0.0.6 lib/r_decorator/rspec.rb
r_decorator-0.0.5 lib/r_decorator/rspec.rb
r_decorator-0.0.4 lib/r_decorator/rspec.rb
r_decorator-0.0.3 lib/r_decorator/rspec.rb