Class: SlopTest

Inherits:
TestCase
  • Object
show all
Defined in:
lib/slop-2.3.1/test/slop_test.rb

Instance Method Summary collapse

Methods inherited from TestCase

test

Instance Method Details

#clean_options(*args) ⇒ Object



4
5
6
# File 'lib/slop-2.3.1/test/slop_test.rb', line 4

def clean_options(*args)
  Slop.new.send(:clean_options, args)
end

#temp_argv(items) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/slop-2.3.1/test/slop_test.rb', line 8

def temp_argv(items)
  old_argv = ARGV.clone
  ARGV.replace items
  yield
ensure
  ARGV.replace old_argv
end