Sha256: 4b184b316716934291affc705ac3f8120b36b62d8b41a0c1ddb02bcd7e16c617

Contents?: true

Size: 945 Bytes

Versions: 4

Compression:

Stored size: 945 Bytes

Contents

require 'bundler/setup'
require 'draper'
require 'rails/version'
require 'action_controller'
require 'action_controller/test_case'

RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.expect_with(:rspec) {|c| c.syntax = :expect}
  config.order = :random
end

class Model; include Draper::Decoratable; end

class Product < Model; end
class ProductDecorator < Draper::Decorator; end
class ProductsDecorator < Draper::CollectionDecorator; end

class ProductPresenter < Draper::Decorator; end

class OtherDecorator < Draper::Decorator; end

module Namespaced
  class Product < Model; end
  class ProductDecorator < Draper::Decorator; end

  class OtherDecorator < Draper::Decorator; end
end

# After each example, revert changes made to the class
def protect_class(klass)
  before { stub_const klass.name, Class.new(klass) }
end

def protect_module(mod)
  before { stub_const mod.name, mod.dup }
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
draper-1.3.0 spec/spec_helper.rb
draper-1.2.1 spec/spec_helper.rb
draper-1.2.0 spec/spec_helper.rb
jamesgolick-draper-1.1.1a spec/spec_helper.rb