Sha256: 6d07d281d1fdd7a82722257dcf4b7568f3d880f56117a4294b278be755d6679a

Contents?: true

Size: 619 Bytes

Versions: 6

Compression:

Stored size: 619 Bytes

Contents

module Draper
  module DecoratorExampleGroup
    include Draper::TestCase::Behavior
    extend ActiveSupport::Concern

    included { metadata[:type] = :decorator }
  end

  RSpec.configure do |config|
    if RSpec::Core::Version::STRING.starts_with?("3")
      config.include DecoratorExampleGroup, file_path: %r{spec/decorators}, type: :decorator
    else
      config.include DecoratorExampleGroup, example_group: {file_path: %r{spec/decorators}}, type: :decorator
    end

    [:decorator, :controller, :mailer].each do |type|
      config.before(:each, type: type) { Draper::ViewContext.clear! }
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
draper_new-3.0.0 lib/draper/test/rspec_integration.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/draper-2.1.0/lib/draper/test/rspec_integration.rb
draper-2.1.0 lib/draper/test/rspec_integration.rb
draper-2.0.0 lib/draper/test/rspec_integration.rb
draper-1.4.0 lib/draper/test/rspec_integration.rb
draper-1.3.1 lib/draper/test/rspec_integration.rb