Sha256: 0e12abe032903a957381eac88aed391a8275249848955845bfcbcdb03f020ae0
Contents?: true
Size: 990 Bytes
Versions: 1
Compression:
Stored size: 990 Bytes
Contents
require 'simplecov' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'minitest/autorun' require 'bundler' Bundler.require require 'inch' require 'inch/cli' def assert_roles(object, expected, unexpected) roles = object.roles.map(&:class) unexpected.each do |role| refute roles.include?(role), "Should not assign #{role}" end expected.each do |role| assert roles.include?(role), "Should assign #{role}" end end def fixture_path(name) File.join(File.dirname(__FILE__), "fixtures", name.to_s) end module Inch module Test class << self attr_accessor :object_providers def codebase(name) Inch::Codebase::Proxy.new object_provider(name) end def object_provider(name) self.object_providers ||= {} self.object_providers[name] ||= ::Inch::CodeObject::Provider.parse(fixture_path(name)) end end end end def test_codebase(name) codebase = Inch::Test.codebase(name) codebase end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inch-0.5.0.rc1 | test/test_helper.rb |