Sha256: 8cec15fd5dcd8e6de40744f040393588e55054378fc544b1baacdbbb93b428ee
Contents?: true
Size: 952 Bytes
Versions: 3
Compression:
Stored size: 952 Bytes
Contents
require "lanes/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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lanes-0.1.2 | spec/concerns/export_methods_spec.rb |
lanes-0.1.0 | spec/concerns/export_methods_spec.rb |
lanes-0.0.8 | spec/concerns/export_methods_spec.rb |