Skip to content
Snippets Groups Projects
Commit aed70e50 authored by Jack Nagel's avatar Jack Nagel
Browse files

Add tests for ARGV.filter_for_dependencies

parent 2bacf388
No related branches found
No related tags found
No related merge requests found
......@@ -44,4 +44,22 @@ class ARGVTests < Test::Unit::TestCase
assert !ARGV.switch?('-n')
end
def test_filter_for_dependencies_clears_flags
ARGV.unshift("--debug")
ARGV.filter_for_dependencies do
assert ARGV.empty?
end
end
def test_filter_for_dependencies_ensures_argv_restored
ARGV.expects(:replace).with(ARGV.clone)
begin
ARGV.filter_for_dependencies { raise Exception }
rescue Exception
end
end
def test_filter_for_dependencies_returns_block_value
assert_equal 1, ARGV.filter_for_dependencies { 1 }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment