Sha256: c0f061323677d3bd7c0be2a057e86984226f2d409b0938331243fd5eaeaca657
Contents?: true
Size: 790 Bytes
Versions: 38
Compression:
Stored size: 790 Bytes
Contents
#!/usr/bin/env ruby begin require 'rubygems' rescue LoadError # got no gems end require 'test/unit' require 'flexmock/test_unit' require 'rake' class TestNameSpace < Test::Unit::TestCase def test_namespace_creation mgr = flexmock("TaskManager") ns = Rake::NameSpace.new(mgr, []) assert_not_nil ns end def test_namespace_lookup mgr = flexmock("TaskManager") mgr.should_receive(:lookup).with(:t, ["a"]). and_return(:dummy).once ns = Rake::NameSpace.new(mgr, ["a"]) assert_equal :dummy, ns[:t] end def test_namespace_reports_tasks_it_owns mgr = flexmock("TaskManager") mgr.should_receive(:tasks).with(). and_return([:x, :y, :z]).once ns = Rake::NameSpace.new(mgr, ["a"]) assert_equal [:x, :y, :z], ns.tasks end end
Version data entries
38 entries across 38 versions & 5 rubygems