Sha256: 11d6f39f3d80bcddf5361dca69189ab763e4d7619313b26565708480c4a9e0ae
Contents?: true
Size: 817 Bytes
Versions: 4
Compression:
Stored size: 817 Bytes
Contents
require "assert" require "osheet/partial" module Osheet class PartialTest < Assert::Context desc "a Partial" before { @p = Partial.new(:thing) {} } subject { @p } should "be a Proc" do assert_kind_of ::Proc, subject end should "convert the name arg to a string and store off" do assert_equal 'thing', subject.instance_variable_get("@name") end end class PartialNameTest < Assert::Context desc "A named partial" should "verify the name argument" do assert_raises ArgumentError do Partial.new([]) {} end assert_raises ArgumentError do Partial.new(1) {} end assert_nothing_raised do Partial.new(:poo) {} end assert_nothing_raised do Partial.new('poo') {} end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
osheet-1.0.0.rc.4 | test/partial_test.rb |
osheet-1.0.0.rc.3 | test/partial_test.rb |
osheet-1.0.0.rc.2 | test/partial_test.rb |
osheet-1.0.0.rc.1 | test/partial_test.rb |