Skip to content

Commit

Permalink
test :required for arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mosop committed Jul 2, 2016
1 parent effe591 commit c6ac75c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
19 changes: 19 additions & 0 deletions spec/features/required_arguments_and_options_spec.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require "../spec_helper"

module Optarg::RequiredArgumentsAndOptionsFeature
class Compile < Optarg::Model
arg "source_file", required: true
end

it "Required Arguments" do
expect_raises(Optarg::RequiredError) { Compile.parse %w() }
end

class Profile < Optarg::Model
string "--birth", required: true
end

it "Required Options" do
expect_raises(Optarg::RequiredError) { Profile.parse %w() }
end
end
11 changes: 0 additions & 11 deletions spec/features/required_arguments_spec.cr

This file was deleted.

0 comments on commit c6ac75c

Please sign in to comment.