Sha256: 1e4deddbbca11f46d75c6a18ac744062140537797b3e9035981746a324a85839
Contents?: true
Size: 1.05 KB
Versions: 165
Compression:
Stored size: 1.05 KB
Contents
def dbg; require "ruby-debug"; debugger; end; require File.join(File.dirname(__FILE__), '../test_helper.rb') class Bridges::BridgeTest < Test::Unit::TestCase def setup @const_store = {} end def teardown end def test__shouldnt_throw_errors ActiveScaffold::Bridge.run_all end def test__cds_bridge ConstMocker.mock("CalendarDateSelect") do |cm| cm.remove assert(! bridge_will_be_installed("CalendarDateSelect")) cm.declare assert(bridge_will_be_installed("CalendarDateSelect")) end end def test__file_column_bridge ConstMocker.mock("FileColumn") do |cm| cm.remove assert(! bridge_will_be_installed("FileColumn")) cm.declare assert(bridge_will_be_installed("FileColumn")) end end protected def find_bridge(name) ActiveScaffold::Bridge.bridges.find{|b| b.name.to_s==name.to_s} end def bridge_will_be_installed(name) assert bridge=find_bridge(name), "No bridge found matching #{name}" bridge.instance_variable_get("@install_if").call end end
Version data entries
165 entries across 165 versions & 7 rubygems