RSpecとMinitest、使うならどっち? / #kanrk06

RSpecとMinitest、使うならどっち? / #kanrk06

関西Ruby会議06で使用したスライドです。
http://regional.rubykaigi.org/kansai06/

動画版はこちらです。
https://www.youtube.com/watch?v=XAzzA4la59E

スライド作成の裏話等はブログに書いています。
http://blog.jnito.com/entry/2015/07/13/073458

48a913a2e3bb5e68aae6f73079648e84?s=128

Junichi Ito

July 11, 2015
Tweet

Transcript

  1. RSpec ͱ Minitest ࢖͏ͳΒͲͬͪʁ גࣜձࣾιχοΫΨʔσϯ ҏ౻ ३Ұ 2015-07-11 ؔ੢Rubyձٞ06

  2. ࣗݾ঺հ • ҏ౻३Ұ • Blog: give IT a try •

    Twitter: @jnchito • RailsϓϩάϥϚ • େࡕ෎๛தࢢग़਎ • ฌݿݝ੢࿬ࢢࡏॅ
  3. ϦϞʔτ ϫʔΫ΍ͬͯ·͢

  4. ੢࿬.rb Ͱษڧձ΍ͬͯ·͢ http://nishiwaki-higashinadarb.doorkeeper.jp/

  5. QiitaͰΑ͘هࣄΛॻ͍ͯ·͢ Rubyͷ෦ 1Ґ Railsͷ෦ 1Ґ RSpecͷ෦ 1Ґ

  6. Everyday Rails Λ຋༁͠·ͨ͠ https://leanpub.com/everydayrailsrspec-jp

  7. ͜͜Ͱ࣭໰Ͱ͢

  8. Έͳ͞ΜɺͪΌΜͱ ςετॻ͍ͯ·͔͢ʁ

  9. ࠓ೔͸ςεςΟϯά ϑϨʔϜϫʔΫͷ࿩Λ͠·͢

  10. ͜ͷൃදͷΰʔϧ

  11. ͜ͷൃදͷΰʔϧ RSpec ͱ Minitest ͷಛ௃΍௕ॴ୹ॴΛൺֱ ͠ɺ ࣗ෼ʹ߹ͬͨϑϨʔϜϫʔΫΛબͿࡍͷ ࢀߟ৘ใʹͯ͠΋Β͏

  12. ͜Ε͔Β͓࿩͢͠Δ಺༰ • ςεςΟϯάϑϨʔϜϫʔΫͷ໾ׂ • RSpec ͱ Minitest ͷ؆୯ͳίʔυྫ • γϯλοΫεͷൺֱʢxUnitܗࣜ

    vs Specܗࣜʣ • ϑϨʔϜϫʔΫͷൺֱʢRSpec vs Mintiestʣ • ߟ࡯ɿRSpec ͸ͳͥҒ͍ਓʹ޷͔Εͳ͍ͷ͔ʁ • ·ͱΊɿ࢖͏ͳΒͲͬͪʁ
  13. ςεςΟϯά ϑϨʔϜϫʔΫͷ໾ׂ

  14. ςεςΟϯάϑϨʔϜϫʔΫͷ໾ׂ • ςετίʔυΛ࣮ߦ͠ɺظ଴ͨ͠௨Γʹ ϓϩάϥϜ͕ಈ࡞͢Δ͜ͱΛݕূ͢Δ • ςετίʔυͱ͸ → ϓϩάϥϜΛςετ͢ΔϓϩάϥϜ • ݕূ݁Ռʢ੒ޭ

    or ࣦഊʣΛ։ൃऀʹใࠂ͢Δ
  15. RSpec ͱ Minitest ͷ ؆୯ͳίʔυྫ

  16. ςετର৅ͷϓϩάϥϜ class Greeter def say 'Hello, world!' end end ɾGreeter

    Ϋϥε ɾsay ϝιου ɾ‘Hello, world!’ ɹΛฦ͢
  17. ্͕ MinitestɺԼ͕ RSpec class GreeterTest < Minitest::Test def test_says_hello_world greeter

    = Greeter.new assert_equal 'Hello, world!', greeter.say end end describe Greeter do it 'says "Hello, world!"' do greeter = Greeter.new expect(greeter.say).to eq 'Hello, world!' end end ↑ xUnitܗࣜ ↑ Specܗࣜ
  18. Minitest ͸ Specܗࣜ Ͱ΋ॻ͚Δ describe Greeter do it 'says "Hello,

    world!"' do greeter = Greeter.new greeter.say.must_equal 'Hello, world!' end end describe Greeter do it 'says "Hello, world!"' do greeter = Greeter.new expect(greeter.say).to eq 'Hello, world!' end end ↑ RSpec ʹͦͬ͘Γʂʂ
  19. ൺֱͷ؍఺͸େ͖͘෼͚ͯೋͭ͋Δ γϯλοΫεͷൺֱ • xUnitܗࣜ vs Specܗࣜ ϑϨʔϜϫʔΫͱͯ͠ͷൺֱ • RSpec vs

    Minitest
  20. xUnitܗࣜ vs Specܗࣜ Minitest RSpec & Minitest

  21. xUnitܗࣜ vs Specܗࣜ Y6OJUܗࣜ 4QFDܗࣜ γϯλοΫε ϐϡΞ3VCZ %4-ʢυΩϡϝϯτ෩ʣ शಘͷϋʔυϧ 3VCZͷจ๏͕Θ͔Ε͹0,

    %4-Λ֮͑Δඞཁ͋Γ ϩδοΫͷࣗ༝౓ 3VCZͷݴޠػೳΛ ϑϧ׆༻Ͱ͖Δ %4-ʹ੍໿͞Ε΍͍͢ ݕূϝιου BTTFSU@FRVBM" # FYQFDU # UPFR" ·ͨ͸#NVTU@FRVBM" ςετͷߏ଄Խ Ϋϥεͷܧঝ·ͨ͸ ແཧʹߏ଄Խ͠ͳ͍ ϒϩοΫΛωετͤ͞Δ ໋໊ͷࣗ༝౓ Ϋϥε໊΍ϝιου໊ͷ ॏෳʹ஫ҙ͕ඞཁ ໋໊͸ൺֱతࣗ༝ อकੑ ڽͬͨίʔυΛॻ͔ΕΔͱ ղੳ͕େมͦ͏ %4-ͷϧʔϧΛҳ୤ ͠ͳ͚Ε͹อक͠΍ͦ͢͏
  22. ςετΛߏ଄Խ͢Δྫ class User def initialize(name:, age:) @name = name @age

    = age end def greet if @age <= 12 "΅͘͸#{@name}ͩΑɻ" else "๻͸#{@name}Ͱ͢ɻ" end end end ৚݅ʹԠͯ͡ςετίʔυ Λߏ଄Խ͍ͨ͠
  23. Specܗࣜ Ͱߏ଄Խ͢Δ৔߹ describe User do before do puts 'Test start.'

    end describe '#greet' do before do puts 'Test start in #greet.' end let(:user) { User.new(name: 'ͨΖ͏', age: age) } subject { user.greet } context '12ࡀҎԼͷ৔߹' do let(:age) { 12 } it { is_expected.to eq '΅͘͸ͨΖ͏ͩΑɻ' } end context '13ࡀҎ্ͷ৔߹' do let(:age) { 13 } it { is_expected.to eq '๻͸ͨΖ͏Ͱ͢ɻ' } end end end ϒϩοΫͰάϧʔϓԽ (ߏ଄Խ)
  24. xUnitܗࣜ Ͱߏ଄Խ͢Δ৔߹ class UserTest < Minitest::Test def setup puts 'Test

    start.' end end module CommonMethods def setup super puts 'Test start in #greet.' @user = User.new(name: 'ͨΖ͏', age: @age) end end class UserTestWhenUnder12 < UserTest prepend CommonMethods def setup super @age = 12 end def test_greet assert_equal '΅͘͸ͨΖ͏ͩΑɻ', @user.greet end end class UserTestWhenAbove13 < UserTest # ͭͮ͘… ܧঝͨ͠Γɺ Ϟδϡʔϧ࡞ͬͨΓɺ prepend ͨ͠Γ super ݺΜͩΓ…
  25. Ͱ΋ߏ଄Խ͠ͳ͍ํ͕γϯϓϧ class UserTestSimplified < Minitest::Test def setup puts 'Test start.'

    end def test_greet puts 'Test start in #greet.' user = User.new(name: 'ͨΖ͏', age: 12) assert_equal '΅͘͸ͨΖ͏ͩΑɻ', user.greet user = User.new(name: 'ͨΖ͏', age: 13) assert_equal '๻͸ͨΖ͏Ͱ͢ɻ', user.greet end end ͥΜͿϑϥοτͰ͑͑΍Μ
  26. xUnitܗࣜ vs Specܗࣜ Y6OJUܗࣜ 4QFDܗࣜ γϯλοΫε ϐϡΞ3VCZ %4-ʢυΩϡϝϯτ෩ʣ शಘͷϋʔυϧ 3VCZͷจ๏͕Θ͔Ε͹0,

    %4-Λ֮͑Δඞཁ͋Γ ϩδοΫͷࣗ༝౓ 3VCZͷݴޠػೳΛ ϑϧ׆༻Ͱ͖Δ %4-ʹ੍໿͞Ε΍͍͢ ݕূϝιου BTTFSU@FRVBM" # FYQFDU # UPFR" ·ͨ͸#NVTU@FRVBM" ςετͷߏ଄Խ Ϋϥεͷܧঝ·ͨ͸ ແཧʹߏ଄Խ͠ͳ͍ ϒϩοΫΛωετͤ͞Δ ໋໊ͷࣗ༝౓ Ϋϥε໊΍ϝιου໊ͷ ॏෳʹ஫ҙ͕ඞཁ ໋໊͸ൺֱతࣗ༝
  27. ࣮ࡍʹࠔ͍ͬͯΔํͷπΠʔτ https://twitter.com/pacojp/status/615138242006880256

  28. xUnitܗࣜ vs Specܗࣜ Y6OJUܗࣜ 4QFDܗࣜ γϯλοΫε ϐϡΞ3VCZ %4-ʢυΩϡϝϯτ෩ʣ शಘͷϋʔυϧ 3VCZͷจ๏͕Θ͔Ε͹0,

    %4-Λ֮͑Δඞཁ͋Γ ϩδοΫͷࣗ༝౓ 3VCZͷݴޠػೳΛ ϑϧ׆༻Ͱ͖Δ %4-ʹ੍໿͞Ε΍͍͢ ݕূϝιου BTTFSU@FRVBM" # FYQFDU # UPFR" ·ͨ͸#NVTU@FRVBM" ςετͷߏ଄Խ Ϋϥεͷܧঝ·ͨ͸ ແཧʹߏ଄Խ͠ͳ͍ ϒϩοΫΛωετͤ͞Δ ໋໊ͷࣗ༝౓ Ϋϥε໊΍ϝιου໊ͷ ॏෳʹ஫ҙ͕ඞཁ ໋໊͸ൺֱతࣗ༝ อकੑ ڽͬͨίʔυΛॻ͔ΕΔͱ ղੳ͕େมͦ͏ %4-ͷϧʔϧΛҳ୤ ͠ͳ͚Ε͹อक͠΍ͦ͢͏
  29. RSpec vs Minitest

  30. RSpec vs Minitest 34QFD .JOJUFTU ར༻཰ɺ৘ใྔ ߴ͍ɺଟ͍ ௿͍ɺগͳ͍ σϑΥϧτͷػೳ ๛෋

    ඞཁ࠷খݶ ʢϓϥάΠϯͰ௥Ճʣ ޙํޓ׵ੑͷҡ࣋ Կ౓͔େ͖ͳมߋ͋Γ ଟগ͋Γ ఏڙܗଶ 3VCZඪ४Ͱ͸ͳ͍ ཁHFNΠϯετʔϧ 3VCZඪ४όϯυϧ ·ͨ͸HFNΠϯετʔϧ 3BJMTͱͷؔ܎ ඪ४Ͱ͸ͳ͍ ཁηοτΞοϓ 3BJMTඪ४ 3BJMTνϡʔτϦΞϧͰ΋࠾༻ ຊମͷίʔυ ଟ͍ɺෳࡶ গͳ͍ɺγϯϓϧ ઃܭࢥ૝ ͢΂͕ͯୈҰڃΫϥε ΦϒδΣΫτ +VTU3VCZ
  31. ར༻཰ͷൺֱʢւ֎ʣ http://www.techwars.io/fight/rspec/minitest/ Stack Overflowͷ࣭໰਺ ٻਓ਺ εΩϧอ༗ऀ਺ RSpec ͷํ͕ϙϐϡϥʔ 6818 34

    275 280 3 15
  32. Qiitaͷ౤ߘ਺ɺϑΥϩϫʔ਺ ౤ߘ਺ = 473 ϑΥϩϫʔ = 294 ౤ߘ਺ = 12

    ϑΥϩϫʔ = 5 ৘ใྔ΋ଟ͍
  33. RSpec vs Minitest 34QFD .JOJUFTU ར༻཰ɺ৘ใྔ ߴ͍ɺଟ͍ ௿͍ɺগͳ͍ σϑΥϧτͷػೳ ๛෋

    ඞཁ࠷খݶ ʢϓϥάΠϯͰ௥Ճʣ ޙํޓ׵ੑͷҡ࣋ Կ౓͔େ͖ͳมߋ͋Γ ଟগ͋Γ 3VCZͱͷؔ܎ 3VCZඪ४Ͱ͸ͳ͍ ཁHFNΠϯετʔϧ 3VCZඪ४όϯυϧ ·ͨ͸HFNΠϯετʔϧ 3BJMTͱͷؔ܎ ඪ४Ͱ͸ͳ͍ ཁηοτΞοϓ 3BJMTඪ४ 3BJMTνϡʔτϦΞϧͰ΋࠾༻ ຊମͷίʔυ ଟ͍ɺෳࡶ গͳ͍ɺγϯϓϧ ઃܭࢥ૝ ͢΂͕ͯୈҰڃΫϥε ΦϒδΣΫτ +VTU3VCZ
  34. RSpec ʹ͔͠ͳ͍ػೳ • ๛෋ͳϚονϟɺߴػೳͳϞοΫɺcontextɺ let!ɺshared examplesɺߦࢦఆ࣮ߦɺ υΩϡϝϯτܗࣜͷ݁Ռදࣔɺetc Minitest ʹ͔͠ͳ͍ػೳ •

    xUnit γϯλοΫεɺϕϯνϚʔΫςετɺ ฒྻ࣮ߦػೳɺϥϯμϜ࣮ߦ͕σϑΥϧτ ػೳͷൺֱ Minitest͸جຊతʹ ϓϥάΠϯͰରԠ
  35. RSpec vs Minitest 34QFD .JOJUFTU ར༻཰ɺ৘ใྔ ߴ͍ɺଟ͍ ௿͍ɺগͳ͍ σϑΥϧτͷػೳ ๛෋

    ඞཁ࠷খݶ ʢϓϥάΠϯͰ௥Ճʣ ޙํޓ׵ੑͷҡ࣋ Կ౓͔େ͖ͳมߋ͋Γ ଟগมߋ͋Γ
  36. RSpec • A.should → expect(A).to • be_true → be_truthy •

    have(n).items → ഇࢭɺผgemԽ • ଞଟ਺ Minitest • test/unit ޓ׵API → ഇࢭ (Ver. 5) • A.must_equal → _(A).must_equal (Ver. 6ʁ) • assert_template ౳ → ഇࢭɺผgemԽ (Rails 5) ޙํޓ׵ੑΛࣺͯͨมߋ Ͱ΋Transpec Ͱ ࣗಈม׵Ͱ͖Δ
  37. RSpec vs Minitest 34QFD .JOJUFTU ར༻཰ɺ৘ใྔ ߴ͍ɺଟ͍ ௿͍ɺগͳ͍ σϑΥϧτͷػೳ ๛෋

    ඞཁ࠷খݶ ʢϓϥάΠϯͰ௥Ճʣ ޙํޓ׵ੑͷҡ࣋ Կ౓͔େ͖ͳมߋ͋Γ ଟগ͋Γ 3VCZͱͷؔ܎ 3VCZඪ४Ͱ͸ͳ͍ ཁHFNΠϯετʔϧ 3VCZඪ४όϯυϧ HFNΠϯετʔϧ΋Մ 3BJMTͱͷؔ܎ 3BJMTඪ४Ͱ͸ͳ͍ ཁηοτΞοϓ 3BJMTඪ४ 3BJMTνϡʔτϦΞϧͰ΋࠾༻ ຊମͷίʔυ ଟ͍ɺෳࡶ গͳ͍ɺγϯϓϧ
  38. ίʔυྔͷൺֱ http://www.techwars.io/fight/rspec/minitest/ http://www.zenspider.com/pdf/2015_railsconf_ruby_on_rails_on_minitest.pdf Minitest RSpec ໿8.5ഒ ίʔυຊମ ίϝϯτ

  39. RSpec vs Minitest 34QFD .JOJUFTU ར༻཰ɺ৘ใྔ ߴ͍ɺଟ͍ ௿͍ɺগͳ͍ σϑΥϧτͷػೳ ๛෋

    ඞཁ࠷খݶ ʢϓϥάΠϯͰ௥Ճʣ ޙํޓ׵ੑͷҡ࣋ Կ౓͔େ͖ͳมߋ͋Γ ଟগ͋Γ 3VCZͱͷؔ܎ 3VCZඪ४Ͱ͸ͳ͍ ཁHFNΠϯετʔϧ 3VCZඪ४όϯυϧ ·ͨ͸HFNΠϯετʔϧ 3BJMTͱͷؔ܎ ඪ४Ͱ͸ͳ͍ ཁηοτΞοϓ 3BJMTඪ४ 3BJMTνϡʔτϦΞϧͰ΋࠾༻ ຊମͷίʔυ ଟ͍ɺෳࡶ গͳ͍ɺγϯϓϧ ύϑΥʔϚϯε ஗͍ʁʁʁ ଎͍ʁʁʁ
  40. ύϑΥʔϚϯε ͷҧ͍ʹ͍ͭͯ • Minitest ͸଎͞ΛചΓʹ͍ͯ͠Δ͕ɺ RSpec ͱମײͰ͖Δ΄Ͳͷࠩ͸ͳ͍ؾ͕͢Δ Minitest RSpec 1000ʙ49000݅΋

    ςετॻ͔ͳ͍͠… http://www.zenspider.com/pdf/2015_railsconf_ruby_on_rails_on_minitest.pdf ʁ
  41. ࣗ෼Ͱܭଌͯ͠Έͨ • Everyday RailsͷςετΛ RSpec όʔδϣϯͱ Minitest όʔδϣϯ(Specܗࣜ)Ͱ࣮ߦ • ςετͷ݅਺͸ͲͪΒ΋

    82݅ ʢ಺༰΋ಉ͡ʣ • 20ճ ࿈ଓ࣮ߦͯ͠ฏۉλΠϜΛࢉग़ ݁Ռ ɾ34QFD  ඵ ɾ.JOJUFTU  ඵ ͋ΕʁRSpecͷ ํ͕଎͔ͬͨ…
  42. ػೳతͳൺֱ͸͜͜·Ͱ

  43. ͯ͞ɺ͔͜͜Β͸ͪΐͬͱ ओ؍త ͳ࿩Λ͠·͢

  44. ΋͠ͻͱ͔ͭ͠࢖͑ͳ͍ͳΒ Ͳͬͪ ΛબͿʁ

  45. ๻ ͩͬͨΒ

  46. RSpecʂ

  47. ๻͕ RSpec ΛબͿཧ༝ • ҰݴͰ͍͏ͱɺଟػೳͰศར͔ͩΒ • ͢Ͱʹ RSpec ͷศརػೳΛϑϧ׆༻͍ͯ͠Δ ͷͰɺΘ͟Θ͟ػೳͷগͳ͍ϑϨʔϜϫʔΫʹ

    Ҡߦ͢ΔϝϦοτ͕ͳ͍ • ͨͩ͠ɺ୯७ͳςετͳΒ Minitest Ͱ΋OK • ηοτΞοϓ͕͍Βͳ͍ͷ͸େ͖ͳϝϦοτ
  48. Minitest ͰؾʹͳΔ఺ • ϓϥάΠϯΛଟ༻͢Δͱ ػೳͷিಥ ΍ ϝϯςφϯε໰୊ ͰࠔΓͦ͏ʢܦݧ͋Γʣ • ෳ਺ͷγϯλοΫε͕͋ΔͷͰɺϝϯόʔʹ

    Αͬͯ ޷Έ͕෼͔Εͦ͏ʢωοτͷ৘ใ΋όϥόϥʣ • RSpec ʹൺ΂Δͱ·ͩ·ͩ ৘ใ͕গͳ͍ ӳޠ ͕ۤखͳਓ͸ಛʹେม͔΋
  49. Ͱ΋ɺͪΐͬͱ଴ͬͯ

  50. ΈΜͳʮRSpec͸ݏ͍ͩʯ ͬͯݴͬͯΔΜ͚ͩͲʁ

  51. ͋ͷ༗໊ͳ˔˔͞Μ ͩͬͯ΄Βʂ

  52. http://togetter.com/li/827508

  53. http://togetter.com/li/827508 34QFDʹ͍ͭͯͷٞ࿦

  54. ͻͲ͍ݴΘΕΑ͏

  55. ೔ຊ͚ͩ͡Όͳͯ͘ ւ֎ Ͱ΋΄Βʂ

  56. http://www.zenspider.com/pdf/2015_railsconf_ruby_on_rails_on_minitest.pdf

  57. http://www.zenspider.com/pdf/2015_railsconf_ruby_on_rails_on_minitest.pdf

  58. http://www.zenspider.com/pdf/2015_railsconf_ruby_on_rails_on_minitest.pdf

  59. RSpec ͸ऴΘͬͨͷʁ ͜Ε͔Β͸ Minitest ͳͷʁ

  60. ͳΜ͔༗໊ͳਓ΄Ͳ RSpec Λܟԕͯͦ͠͏

  61. Whyʁ

  62. That is because…

  63. DIYerؾ࣭ ͕ڧ͍ਓ΄Ͳ MinitestʢಛʹxUnitʣΛ޷Ή ஫ɿ͋͘·Ͱ Ծઆ Ͱ͢

  64. DIYerͬͯԿʁ • DIYer = Do It Yourself-er • ʮͦͷػೳɺͳ͍ͳΒࣗ෼Ͱ࡞Δͥʂʯͱ ߟ͑Δਓ

    • ͻ͍ͯ͸gem΍ϑϨʔϜϫʔΫΛΑ͘ ࡞͍ͬͯΔਓ
  65. Minitest really is a testing framework for Do It Yourself-ers.

    Minitest͸ DIYer ͷͨΊͷςεςΟϯά ϑϨʔϜϫʔΫͰ͢ɻ The Minitest Cookbook http://chriskottom.com/minitestcookbook/ ͜ͷຊ͔ΒώϯτΛಘ·ͨ͠
  66. DIYerؾ࣭ ͕ڧ͍ਓ΄Ͳɾɾɾ • ԟʑʹͯ͠RubyͷΤΩεύʔτͳͷͰɺDSLΛ ֮͑Δ͙Β͍ͳΒϐϡΞRubyͰॻ͍ͨํ͕଎͍ • ࣗ෼Ͱ޷͖ͳΑ͏ʹ֦ு͍ͨ͠ͷͰɺgemͷ ίʔυ͸ খͯ͘͞ಡΈ΍͍͢ ํ͕๬·͍͠

    • APIઃܭʹڧ͍ͩ͜ΘΓͱ৴೦͕͋ΔͷͰ ഽʹ߹Θͳ͍γϯλοΫε ͸࢖͍ͨ͘ͳ͍
  67. ݁Ռͱͯ͠ɺҒ͍ਓͷ RSpecݏ͍ൃݴ͕૿͑Δ

  68. ஫ɿ͋͘·Ͱ Ծઆ Ͱ͢

  69. ๻Έ͍ͨͳλΠϓ͸ RSpec ޲͖ʁ • DIYerؾ࣭ ͕ͦΕ΄Ͳڧ͘ͳ͍ • gem ΍ϑϨʔϜϫʔΫ͸ ࢖͏ଆ

    ͕ϝΠϯ • DSL Λ࢖͏͜ͱʹ఍߅͕ͳ͍ɻΉ͠ΖDSLʹ ϝϦοτΛײ͍ͯ͡Δ • ଟػೳ ͳํ͕͍Ζ͍ΖϥΫग़དྷͯ޷͖
  70. ·ͱΊɿRSpecͱMinitest ࢖͏ͳΒͲͬͪʁ

  71. RSpecͱMinitestɺ࢖͏ͳΒͲͬͪʁ • Ұൠ࿦Ͱ͍͑͹ɺͲͬͪͰ΋ྑ͍ʢ౰ͨΓલʣ • ௕ॴ୹ॴ͸ͲͪΒʹ΋͋Δ • ݸਓతͳΦεεϝʢ๻ͷ޷Έʣ͸ RSpec • ͨͩ͠ɺDIYerؾ࣭͕ڧ͍ਓ΍ɺ

    ͱʹ͔͘ RSpec ͕ݏ͍ʂͱ͍͏ਓ͸আ͘ • Ͱ΋ࣗ෼Ͱ࢖͔ͬͯ֬ΊΔͷ͕ϕετͰ͢ʂ
  72. ͓͞Β͍ɿ͜ͷൃදͷΰʔϧ RSpec ͱ Minitest ͷಛ௃΍௕ॴ୹ॴΛൺֱ ͠ɺ ࣗ෼ʹ߹ͬͨϑϨʔϜϫʔΫΛબͿࡍͷ ࢀߟ৘ใ ʹͯ͠΋Β͏

  73. Ғ͍ਓͷൃݴ΍ࠓ೔ͷ ൃද͸͋͘·Ͱ ࢀߟ৘ใ

  74. RSpec ͱ Minitest ࢖͏ͳΒͲͬͪʁ

  75. ࢲ͸ʮɹɹɹɹʯͰ͢

  76. ݁࿦Λग़͢લʹ·ͣ ྆ํ࢖ͬͯΈ͍ͯͩ͘͞!

  77. Thank you.

  78. Oh, one more thing

  79. Everyday Rails ޷ධൃചதʂ ʴ ೔ຊޠ൛ಠࣗͷ ௥Ճίϯςϯπ https://leanpub.com/everydayrailsrspec-jp