Sha256: 0190591e2db22f76064f9a90af5aa1091d854b242997afe27921a02a5a4b45c6

Contents?: true

Size: 600 Bytes

Versions: 6

Compression:

Stored size: 600 Bytes

Contents

require 'backports'
require 'pathname'
require 'rubygems'
require 'rspec'

require 'virtus'

ENV['TZ'] = 'UTC'

SPEC_ROOT = Pathname(__FILE__).dirname.expand_path

Pathname.glob((SPEC_ROOT + '**/shared/**/*.rb').to_s).each { |file| require file }

RSpec.configure do |config|

  # Remove anonymous Attribute classes from Attribute descendants
  config.after :all do
    stack = [ Virtus::Attribute ]
    while klass = stack.pop
      klass.descendants.delete_if do |descendant|
        descendant.name.nil? || descendant.name.empty?
      end
      stack.concat(klass.descendants)
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
virtus-0.0.10 spec/spec_helper.rb
virtus-0.0.9 spec/spec_helper.rb
virtus-0.0.8 spec/spec_helper.rb
virtus-0.0.7 spec/spec_helper.rb
virtus-0.0.6 spec/spec_helper.rb
virtus-0.0.5 spec/spec_helper.rb