summaryrefslogtreecommitdiff
path: root/spec/ruby/library/getoptlong/shared/each.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/getoptlong/shared/each.rb')
-rw-r--r--spec/ruby/library/getoptlong/shared/each.rb18
1 files changed, 0 insertions, 18 deletions
diff --git a/spec/ruby/library/getoptlong/shared/each.rb b/spec/ruby/library/getoptlong/shared/each.rb
deleted file mode 100644
index b534e24c0f..0000000000
--- a/spec/ruby/library/getoptlong/shared/each.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-describe :getoptlong_each, shared: true do
- before :each do
- @opts = GetoptLong.new(
- [ '--size', '-s', GetoptLong::REQUIRED_ARGUMENT ],
- [ '--verbose', '-v', GetoptLong::NO_ARGUMENT ],
- [ '--query', '-q', GetoptLong::NO_ARGUMENT ],
- [ '--check', '--valid', '-c', GetoptLong::NO_ARGUMENT ]
- )
- end
-
- it "passes each argument/value pair to the block" do
- argv [ "--size", "10k", "-v", "-q", "a.txt", "b.txt" ] do
- pairs = []
- @opts.send(@method) { |arg, val| pairs << [ arg, val ] }
- pairs.should == [ [ "--size", "10k" ], [ "--verbose", "" ], [ "--query", ""] ]
- end
- end
-end