Sha256: 0b6ddc192679a13b3efef47f6541c2183a94b5b5647dd0619e774486cdabf345
Contents?: true
Size: 778 Bytes
Versions: 2
Compression:
Stored size: 778 Bytes
Contents
require "assert" require 'osheet/format' module Osheet class FormatTests < Assert::Context desc "a Format" before do @f = Format.new(:number, { :decimal_places => 4, :comma_separator => true, :negative_numbers => :black_parenth }) end subject { @f } should "build format class instances" do assert_kind_of Format::Number, subject assert_equal 4, subject.decimal_places assert_equal true, subject.comma_separator assert_equal 'black_parenth', subject.negative_numbers end should "error for invalid format types" do assert_raises ArgumentError do Format.new(:awesome, {}) end assert_nothing_raised do Format.new(:general) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
osheet-1.0.0.rc.4 | test/format_test.rb |
osheet-1.0.0.rc.3 | test/format_test.rb |