Module: Module::Etest

Defined in:
lib/vex/base/invalid_argument/invalid_argument.rb

Defined Under Namespace

Classes: X

Instance Method Summary collapse

Instance Method Details

#test_invalid_argumentObject



88
89
90
91
92
93
94
95
96
# File 'lib/vex/base/invalid_argument/invalid_argument.rb', line 88

def test_invalid_argument
  assert_raises_kind_of(ArgumentError) { 
    X.new.c 1
  }
  
  assert_nothing_raised {  
    X.new.c 0
  }
end

#test_missingObject



77
78
79
80
# File 'lib/vex/base/invalid_argument/invalid_argument.rb', line 77

def test_missing
  assert_raise(MissingImplementation) { X.new.a }
  assert_raise(MissingImplementation) { X.new.a 1, 2 }
end

#test_missing_optionsObject



82
83
84
85
86
# File 'lib/vex/base/invalid_argument/invalid_argument.rb', line 82

def test_missing_options
  assert_raises_kind_of(ArgumentError) {
    X.new.d :a => "b", :c => "d"
  }
end