Sha256: 72620ff0c9519417a0595b2d4405274e8603ce799b22859034e33c8b085c1c1b
Contents?: true
Size: 853 Bytes
Versions: 1
Compression:
Stored size: 853 Bytes
Contents
require "assert" require "ggem/gem" class GGem::Gem class UnitTests < Assert::Context desc "GGem::Gem" setup do @gem_class = GGem::Gem end end class InitTests < UnitTests desc "when init" setup do @gem_name = Factory.string @gem = @gem_class.new(TMP_PATH, @gem_name) end subject{ @gem } should have_readers :root_path, :name should have_imeths :save!, :path, :name=, :module_name, :ruby_name should "know its root path and path" do assert_equal TMP_PATH, subject.root_path assert_equal File.join(TMP_PATH, @gem_name), subject.path end should "complain if no name is provided" do assert_raises(NoNameError) do @gem_class.new(TMP_PATH, [nil, ""].sample) end end # most of the gem"s behavior is covered in the system tests end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ggem-1.9.0 | test/unit/gem_tests.rb |