Skip to content

tddbc/ruby_rspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

47afa67 · Jun 24, 2024

History

60 Commits
Jan 31, 2016
Jan 31, 2016
Apr 9, 2013
Jun 5, 2014
May 7, 2021
Jan 31, 2016
Jun 12, 2023
Jan 31, 2016
Apr 9, 2013
Jun 24, 2024
Oct 21, 2014

Repository files navigation

TDDBC for Ruby with RSpec

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

Build Status

動作確認環境

  • ruby 2.7以降

セットアップ

gem install bundler
bundle install
bundle update

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/

About

skeleton for ruby users.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages