Sha256: b68b240c3fe670bee32fdd98167cb129b84e4c3b8b88cd5fbee7e12873fbdfc9
Contents?: true
Size: 956 Bytes
Versions: 18
Compression:
Stored size: 956 Bytes
Contents
require_relative "../spec_helper" class ExportMethodsTest < Lanes::TestCase include TestingModels def test_simple_delegation refute TestModel.new.respond_to? :bt_description TestModel.send :delegate_and_export, "bt_description" md = TestModel.new assert md.respond_to? :bt_description, "Didn't add transaction_description method" assert_nil md.bt_description md.build_bt( description: "test123" ) assert_equal "test123", md.bt_description assert TestModel.has_exported_method?( :bt_description, nil ), "Didn't export method" end def test_dependancy_calculation TestModel.send :delegate_and_export, "bt_description" TestModel.send :delegate_and_export, "bt_notes", optional: false assert_includes TestModel.exported_method_dependancies([]), :bt assert_includes TestModel.exported_method_dependancies(['bt_description']), :bt end end
Version data entries
18 entries across 18 versions & 1 rubygems