Project

st

0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
A CLI for Studytube
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.27, ~> 1.27
 Project Readme

st¶ ↑

  • This repository is archived

  • No longer maintained

I didn’t publish the gem to rubygems.org

Description¶ ↑

A Simplified Testing Framework.

Futures¶ ↑

  • Simple 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 ocurred `NoMethodError`.  # (example.rb:40:in `block in <main>')
    # Failure: Expected an error `SyntaxError` or any suberror, but ocurred `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

License¶ ↑

The MIT X11 License

Copyright © 2012 Kenichi Kamiya

See the file LICENSE for further details.