Sha256: dc2c060e5d73bef0d2d06aa11e5d86d16ff99e1f2003db13888c1a74d0f38eb1

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

module Cypress
  class Configuration
    attr_accessor :test_framework, :db_resetter, :cache_classes

    def initialize
      @test_framework = :rspec
      @db_resetter    = :database_cleaner
      @before         = proc {}
    end

    def include(mod)
      ScenarioContext.send :include, mod
    end

    def before(&block)
      if block_given?
        @before = block
      else
        @before
      end
    end

    def cache_classes
      !! @cache_classes
    end

    def disable_class_caching
      if @cache_classes.nil?
        @cache_classes = false
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cypress-on-rails-0.1.5 lib/cypress/configuration.rb