Skip to content

Commit

Permalink
Additional options tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmagick committed Feb 17, 2007
1 parent 50eed64 commit 26b9856
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Info.rb
Expand Up @@ -13,9 +13,22 @@ def setup
end

def test_options

# 1-argument form
assert_nothing_raised { @info['fill'] }
assert_nil(@info['fill'])

assert_nothing_raised { @info['fill'] = 'red' }
assert_equal("red", @info['fill'])

assert_nothing_raised { @info['fill'] = nil }
assert_nil(@info['fill'])

# 2-argument form
assert_nothing_raised { @info['tiff', 'bits-per-sample'] = 2 }
assert_equal("2", @info['tiff', 'bits-per-sample'])

# define and undefine
assert_nothing_raised { @info.define('tiff', 'bits-per-sample', 4) }
assert_equal("4", @info['tiff', 'bits-per-sample'])

Expand Down

0 comments on commit 26b9856

Please sign in to comment.