Module: Hash::Etest
- Defined in:
- lib/vex/base/system.rb,
lib/vex/base/hash/inspect.rb
Instance Method Summary collapse
- #test_inspect ⇒ Object
- #test_system ⇒ Object
- #test_system! ⇒ Object
- #test_which ⇒ Object
- #test_which! ⇒ Object
Instance Method Details
#test_inspect ⇒ Object
13 14 15 16 |
# File 'lib/vex/base/hash/inspect.rb', line 13 def test_inspect h = {"b" => 2, :a => 2} assert_equal('{:a => 2, "b" => 2}', h.inspect) end |
#test_system ⇒ Object
58 59 60 61 62 |
# File 'lib/vex/base/system.rb', line 58 def test_system assert_equal true, System.sys("true") assert_equal false, System.sys("false") assert_equal false, System.sys("command_not_existing") end |
#test_system! ⇒ Object
64 65 66 67 68 |
# File 'lib/vex/base/system.rb', line 64 def test_system! assert_nothing_raised { System.sys!("true") } assert_raise(System::ProcessFailed) { System.sys!("false") } assert_raise(System::ProcessFailed) { System.sys!("command_not_existing") } end |