- retired! - A Simplified Testing Framework.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
History.rdoc
LICENSE
Manifest.txt
README.rdoc
Rakefile
example.rb

README.rdoc

st

code

github.com/kachick/st

gem

rubygems.org/gems/st

Description

A Simplified Testing Framework.

Futures

  • Symple syntax & Tiny keyboard typings

Usage

  • Setup

    require 'my_codes'  # Write here tha path, your lib or codes
    require 'st'        # at Last of requires
  • Overview

    ST 'Successful case' do
    
      s = 'Sample Strings'
    
      s.IS 'Sample Strings'
      s.NOT 'Critical Value'
      s.MATCH /\S+ \S+/
      s.EQUAL s
      s.EQL 'Sample Strings'
      s.KIND String
      s.A String
    
      Exception.RESCUE do
        s.fooooooooooobar!
      end
    
      NoMethodError.CATCH do
        s.fooooooooooobar!
      end
    
    end
    
    # # Successful case"
    # 9 tests: Pass: 9 - Fail: 0
    # ------------------------------------------------------------------------------
    
    ST 'Failure case' do
    
      s = 'Sample Strings'
    
      s.IS ';)'
      s.NOT 'Sample Strings'
      s.MATCH /\d/
      s.EQUAL 'Sample Strings'
      s.EQL :'Sample Strings'
      s.KIND Symbol
      s.A Symbol
    
      Exception.CATCH do
        s.fooooooooooobar!
      end
    
      SyntaxError.RESCUE do
        s.fooooooooooobar!
      end
    
    end
    
    # # Failure case
    # Failure: `"Sample Strings"` not IS `";)"`.  # (example.rb:32:in `block in <main>')
    # Failure: `"Sample Strings"` not NOT `"Sample Strings"`.  # (example.rb:33:in `block in <main>')
    # Failure: `"Sample Strings"` not MATCH `/\d/`.  # (example.rb:34:in `block in <main>')
    # Failure: `"Sample Strings"` not EQUAL `"Sample Strings"`.  # (example.rb:35:in `block in <main>')
    # Failure: `"Sample Strings"` not EQL `:"Sample Strings"`.  # (example.rb:36:in `block in <main>')
    # Failure: `"Sample Strings"` not KIND `Symbol`.  # (example.rb:37:in `block in <main>')
    # Failure: `"Sample Strings"` not A `Symbol`.  # (example.rb:38:in `block in <main>')
    # Failure: Expected just an error `Exception`, but ocuured `NoMethodError`.  # (example.rb:40:in `block in <main>')
    # Failure: Expected an error `SyntaxError` or any suberror, but ocuured `NoMethodError`.  # (example.rb:44:in `block in <main>')
    # 9 tests: Pass: 0 - Fail: 9
    # ------------------------------------------------------------------------------

Requirements

  • Ruby 1.9.2 or later

    Focusing

    • 1.9.3-p194

    • 1.9.2-p290

Installation

  • gem install st

License

The MIT X11 License

Copyright © 2012 Kenichi Kamiya

See the file LICENSE for further details.