Sha256: 785968b509324ff4393efff77d9c3ae21420d95b0e18b0b0bb469771ff171dd5
Contents?: true
Size: 751 Bytes
Versions: 2
Compression:
Stored size: 751 Bytes
Contents
# encoding: UTF-8 require File.join(".", "lib", "cargo") setup do unless defined?(Foo1) Foo1 = import("test/foo-1.0.0") end unless defined?(Foo2) Foo2 = import("test/foo-2.0.0") end end test "Foo is not available" do assert nil == defined?(Foo) end test "Foo1 is a class" do assert Class == Foo1.class end test "methods are available" do assert "Hello" == Foo1.new.bar end test "methods on nested classes are available" do assert "Hello" == Foo1::Bar.new.baz assert "Hello" == Foo1::Bar::Baz.new.qux end test "nested classes are not available in the top level" do begin Bar::Baz.new.qux rescue assert NameError == $!.class end end test "Foo2 should be possible" do assert "Hello" == Foo2.new.bar end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cargo-0.0.3 | test/cargo_test.rb |
cargo-0.0.2 | test/cargo_test.rb |