test/parser_test.rb in wisepdf-1.2.6 vs test/parser_test.rb in wisepdf-1.2.7

- old
+ new

@@ -1,57 +1,57 @@ require 'helper' -class ParserTest < Test::Unit::TestCase +class ParserTest < Test::Unit::TestCase context "Options normalization" do setup do Wisepdf::Configuration.reset! - + @options = { Wisepdf::Parser::ESCAPED_OPTIONS.sample => 'value' } end - + should 'escape and parse digit options' do @options.merge!({ :key => 10 }) expected = { '--key' => '10' } - + assert_equal expected, Wisepdf::Parser.parse(@options) end - + should 'escape and parse string options' do @options.merge!({ :key => 'value' }) expected = { '--key' => 'value' } - + assert_equal expected, Wisepdf::Parser.parse(@options) end - + should 'escape and parse boolean (true) options' do @options.merge!({ :key => true }) expected = { '--key' => nil } - + assert_equal expected, Wisepdf::Parser.parse(@options) end - + should 'escape and parse boolean (false) options' do @options.merge!({ :key => false }) expected = {} - + assert_equal expected, Wisepdf::Parser.parse(@options) end - + should 'escape and parse nested options' do @options.merge!({ :key => 'value', :nested => { :key => 'value' @@ -59,10 +59,10 @@ }) expected = { '--key' => 'value', '--nested-key' => 'value' } - + assert_equal expected, Wisepdf::Parser.parse(@options) - end + end end -end \ No newline at end of file +end