Skip to content

tddbc/ruby_rspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TDDBC for Ruby with RSpec

これは、TDDBCのRuby向けRSpecプロジェクトです。

Build Status

動作確認環境

  • ruby 2.7以降

セットアップ

gem install bundler
bundle install

rspec コマンドを実行して

$ rspec

Sample
  #say
    Using expect to
      should say 'Hello TDD BootCamp!'
    Using subject it should
      should eq "Yeah! TDD BootCamp!"
    Using power assert
      should 
            be asserted by{ sample.say(greeting) == "Wow! TDD BootCamp!" }
                            |      |   |         |
                            |      |   |         true
                            |      |   "Wow!"
                            |      "Wow! TDD BootCamp!"
                            #<Sample:0x0000563cf08833e8>

Finished in 0.10792 seconds (files took 0.80775 seconds to load)
3 examples, 0 failures

のようにテストが正常終了すればOKです。

ライブラリ

guard コマンドを実行すると入力待ちの状態になるので、あとはファイルが変更される度にテストが実行されます

OSごとに下記のソフトを入れるとテスト結果がOS毎の通知欄に表示されます

Windows

notifu: http://www.paralint.com/projects/notifu/

Mac

growl: http://growl.info/

他Unix系(Linux, FreeBSD, OpenBSD and Solaris)

libnotify: https://developer.gnome.org/libnotify/

Releases

No releases published

Packages

No packages published

Languages