SlideShare a Scribd company logo
1 of 41
Download to read offline
2009
                2009-10-31 OSC 2009 Tokyo/Fall
                                          Rails




2009   11   2
(::)
2009   11   2
2009 -

                    Model by AR or Ruby   RSpec on Rails


                      Controller by AC    RSpec on Rails


                     View by Haml or ..
                                          RSpec on Rails
                          (many)


                     Helper by AV or ..   RSpec on Rails
                2009-01-24        Ruby     01
2009   11   2
2009   Rails

                ✓
                ✓

                ✓


2009   11   2
(::)
2009   11   2
http://d.hatena.ne.jp/moro/

                ✓

                ✓

                ✓http://ruby.agile.esm.co.jp/
2009   11   2
http://amazon.jp/gp/product/4797336625
2009   11   2
2009   11   2
(::)
2009   11   2
2008-10   Ruby   01


2009   11   2
Cucumber&RSpec

                ✓
                ✓



2009   11   2
(::)
2009   11   2
http://cukes.info
2009   11   2
Cucumber
                ✓


                ✓




2009   11   2
2009   11   2
Execute Plain Text
                ✓ “features”
                 ✓

                ✓ “step_definitions”
                 ✓             features   Ruby




2009   11   2
2009   11   2
Given( /^Wiki"(.*)"                                 "(.*)"              $/) do |nname, pname|
    note = Note.find_by_name(nname)
    attrs = valid_attributes[:page].merge({ :display_name => pname })
    page = note.build_front_page
    page.attributes = attrs
    content = "#{nname}                     !"
    page.edit(content, @user)
    page.save
  end
   


                http://github.com/openskip/skip-wiki/blob/master/features/step_definitions/skip_note_steps.rb




2009   11   2
# Order is opposite from original (English) version
        When /^"([^"]*)" "([^"]*)"                 $/ do |parent, link|
          When %Q(I follow "#{link}" within "#{parent}")
        end
         
        When /^"([^"]*)" "([^"]*)"         $/ do |field, value|
          When %Q(I fill in "#{field}" with "#{value}")
        end



                http://github.com/moro/miso/blob/master/rails_generators/miso/templates/webrat_ja_steps.rb




2009   11   2
Black box




2009   11   2
Rails

                ✓

                ✓
                ✓


2009   11   2
(::)
2009   11   2
http://rspec.info
2009   11   2
describe DeltaAttack::FiletypeAssumption do
         include SpecHelper
         it "should not support_magic" do
           DeltaAttack::FiletypeAssumption.should_not be_support_magic
         end
        
         describe "new('hoge.xls')" do
           before do
             @asm = DeltaAttack::FiletypeAssumption.new('hoge.xls')
           end
        
           it "filetype.should == :excel" do
             @asm.filetype.should == :excel
           end
         end
       end

                http://github.com/moro/delta_attack/blob/master/spec/filetype_assumption_spec.rb



2009   11   2
RSpec
                ✓

                ✓

                ✓

2009   11   2
✓   subject { }
                ✓   its(:attr){ }


2009   11   2
subject { }
                ✓    Example(it)   (=subject)



                ✓it{ }                 should



                ✓subject{ }
                    should



2009   11   2
describe Array do
         before do
           @arr = [1,2,3]
         end
         it{ @arr.should have(3).items }
       end




2009   11   2
describe Array do
         before do
           @arr = [1,2,3]
         end

         subject{ @arr }
         it{ should have(3).items }
       end




2009   11   2
before
                ✓
                    before {}

                ✓ subject{}




2009   11   2
its()

                ✓       1.2.9

                ✓ subject{}             its()
                      send




2009   11   2
describe Array do
         before do
           @arr = [1,2,3]
         end

         subject{ @arr.size }
         it{ should == 3 }
       end




2009   11   2
describe Array do
         before do
           @arr = [1,2,3]
         end

         subject{ @arr }
         its(:size){ should == 3 }
       end




2009   11   2
✓ subject


                 ✓
                ✓ CustomMatcher



2009   11   2
RSpec

                ✓
                ✓
                ✓



2009   11   2
Rails
                ✓
                ✓

                ✓
                ✓

2009   11   2
(::)
2009   11   2
2009   Rails

                ✓
                ✓

                ✓


2009   11   2
2009 -

                    Model by AR or Ruby   RSpec on Rails


                      Controller by AC    RSpec on Rails


                     View by Haml or ..
                                          RSpec on Rails
                          (many)


                     Helper by AV or ..   RSpec on Rails
                2009-01-24        Ruby     01
2009   11   2
http://wiki.fdiary.net/rails/?RailsMeetingTokyo-0045
2009   11   2
2009   11   2

More Related Content

Similar to Rails testing environment, 2009 fall

New features in abap
New features in abapNew features in abap
New features in abapSrihari J
 
And now you have two problems. Ruby regular expressions for fun and profit by...
And now you have two problems. Ruby regular expressions for fun and profit by...And now you have two problems. Ruby regular expressions for fun and profit by...
And now you have two problems. Ruby regular expressions for fun and profit by...Codemotion
 
11.11.22 かなり役立つ競技プログラミング
11.11.22 かなり役立つ競技プログラミング11.11.22 かなり役立つ競技プログラミング
11.11.22 かなり役立つ競技プログラミングKei Nakazawa
 
Railswaycon 2009 - Summary
Railswaycon 2009 - SummaryRailswaycon 2009 - Summary
Railswaycon 2009 - Summarydaniel.mattes
 
Migrating To Ruby1.9
Migrating To Ruby1.9Migrating To Ruby1.9
Migrating To Ruby1.9tomaspavelka
 
RoR 101: Session 1
RoR 101: Session 1RoR 101: Session 1
RoR 101: Session 1Rory Gianni
 
Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....Raffi Krikorian
 
All about Erubis (English)
All about Erubis (English)All about Erubis (English)
All about Erubis (English)kwatch
 
Ruby sittin' on the Couch
Ruby sittin' on the CouchRuby sittin' on the Couch
Ruby sittin' on the Couchlangalex
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)Stoyan Zhekov
 
Ruby Xml Mapping
Ruby Xml MappingRuby Xml Mapping
Ruby Xml MappingMarc Seeger
 
Impacta - Show Day de Rails
Impacta - Show Day de RailsImpacta - Show Day de Rails
Impacta - Show Day de RailsFabio Akita
 
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSLRubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSLRuby Bangladesh
 

Similar to Rails testing environment, 2009 fall (20)

New features in abap
New features in abapNew features in abap
New features in abap
 
And now you have two problems. Ruby regular expressions for fun and profit by...
And now you have two problems. Ruby regular expressions for fun and profit by...And now you have two problems. Ruby regular expressions for fun and profit by...
And now you have two problems. Ruby regular expressions for fun and profit by...
 
DB2 Native XML
DB2 Native XMLDB2 Native XML
DB2 Native XML
 
11.11.22 かなり役立つ競技プログラミング
11.11.22 かなり役立つ競技プログラミング11.11.22 かなり役立つ競技プログラミング
11.11.22 かなり役立つ競技プログラミング
 
Railswaycon 2009 - Summary
Railswaycon 2009 - SummaryRailswaycon 2009 - Summary
Railswaycon 2009 - Summary
 
Migrating To Ruby1.9
Migrating To Ruby1.9Migrating To Ruby1.9
Migrating To Ruby1.9
 
RoR 101: Session 1
RoR 101: Session 1RoR 101: Session 1
RoR 101: Session 1
 
Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....
 
Sinatra
SinatraSinatra
Sinatra
 
Ruby 1.9
Ruby 1.9Ruby 1.9
Ruby 1.9
 
How to eat Cucmber
How to eat CucmberHow to eat Cucmber
How to eat Cucmber
 
All about Erubis (English)
All about Erubis (English)All about Erubis (English)
All about Erubis (English)
 
Ruby DSL
Ruby DSLRuby DSL
Ruby DSL
 
Ruby sittin' on the Couch
Ruby sittin' on the CouchRuby sittin' on the Couch
Ruby sittin' on the Couch
 
Gemboys
GemboysGemboys
Gemboys
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)
 
Ruby Xml Mapping
Ruby Xml MappingRuby Xml Mapping
Ruby Xml Mapping
 
Impacta - Show Day de Rails
Impacta - Show Day de RailsImpacta - Show Day de Rails
Impacta - Show Day de Rails
 
RSpec
RSpecRSpec
RSpec
 
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSLRubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
 

More from Kyosuke MOROHASHI

Ruby ecosystem applied to agile project
Ruby ecosystem applied to agile projectRuby ecosystem applied to agile project
Ruby ecosystem applied to agile projectKyosuke MOROHASHI
 
Test Context Arrangement Recipebook
Test Context Arrangement RecipebookTest Context Arrangement Recipebook
Test Context Arrangement RecipebookKyosuke MOROHASHI
 
Begin cucumber-in-real-world
Begin cucumber-in-real-worldBegin cucumber-in-real-world
Begin cucumber-in-real-worldKyosuke MOROHASHI
 
TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"Kyosuke MOROHASHI
 
OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京Kyosuke MOROHASHI
 

More from Kyosuke MOROHASHI (10)

Introduction HTTP via cURL
Introduction HTTP via cURLIntroduction HTTP via cURL
Introduction HTTP via cURL
 
Ruby ecosystem applied to agile project
Ruby ecosystem applied to agile projectRuby ecosystem applied to agile project
Ruby ecosystem applied to agile project
 
Test Context Arrangement Recipebook
Test Context Arrangement RecipebookTest Context Arrangement Recipebook
Test Context Arrangement Recipebook
 
Begin cucumber-in-real-world
Begin cucumber-in-real-worldBegin cucumber-in-real-world
Begin cucumber-in-real-world
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
 
TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"
 
Rails Tokyo 035 Cucumber
Rails Tokyo 035 CucumberRails Tokyo 035 Cucumber
Rails Tokyo 035 Cucumber
 
OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京
 
named_scope more detail
named_scope more detailnamed_scope more detail
named_scope more detail
 
Rails <form> Chronicle
Rails <form> ChronicleRails <form> Chronicle
Rails <form> Chronicle
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Rails testing environment, 2009 fall

  • 1. 2009 2009-10-31 OSC 2009 Tokyo/Fall Rails 2009 11 2
  • 2. (::) 2009 11 2
  • 3. 2009 - Model by AR or Ruby RSpec on Rails Controller by AC RSpec on Rails View by Haml or .. RSpec on Rails (many) Helper by AV or .. RSpec on Rails 2009-01-24 Ruby 01 2009 11 2
  • 4. 2009 Rails ✓ ✓ ✓ 2009 11 2
  • 5. (::) 2009 11 2
  • 6. http://d.hatena.ne.jp/moro/ ✓ ✓ ✓http://ruby.agile.esm.co.jp/ 2009 11 2
  • 8. 2009 11 2
  • 9. (::) 2009 11 2
  • 10. 2008-10 Ruby 01 2009 11 2
  • 11. Cucumber&RSpec ✓ ✓ 2009 11 2
  • 12. (::) 2009 11 2
  • 14. Cucumber ✓ ✓ 2009 11 2
  • 15. 2009 11 2
  • 16. Execute Plain Text ✓ “features” ✓ ✓ “step_definitions” ✓ features Ruby 2009 11 2
  • 17. 2009 11 2
  • 18. Given( /^Wiki"(.*)" "(.*)" $/) do |nname, pname|   note = Note.find_by_name(nname)   attrs = valid_attributes[:page].merge({ :display_name => pname })   page = note.build_front_page   page.attributes = attrs   content = "#{nname} !"   page.edit(content, @user)   page.save end   http://github.com/openskip/skip-wiki/blob/master/features/step_definitions/skip_note_steps.rb 2009 11 2
  • 19. # Order is opposite from original (English) version When /^"([^"]*)" "([^"]*)" $/ do |parent, link|   When %Q(I follow "#{link}" within "#{parent}") end   When /^"([^"]*)" "([^"]*)" $/ do |field, value|   When %Q(I fill in "#{field}" with "#{value}") end http://github.com/moro/miso/blob/master/rails_generators/miso/templates/webrat_ja_steps.rb 2009 11 2
  • 21. Rails ✓ ✓ ✓ 2009 11 2
  • 22. (::) 2009 11 2
  • 24. describe DeltaAttack::FiletypeAssumption do   include SpecHelper   it "should not support_magic" do     DeltaAttack::FiletypeAssumption.should_not be_support_magic   end     describe "new('hoge.xls')" do     before do       @asm = DeltaAttack::FiletypeAssumption.new('hoge.xls')     end       it "filetype.should == :excel" do       @asm.filetype.should == :excel     end   end end http://github.com/moro/delta_attack/blob/master/spec/filetype_assumption_spec.rb 2009 11 2
  • 25. RSpec ✓ ✓ ✓ 2009 11 2
  • 26. subject { } ✓ its(:attr){ } 2009 11 2
  • 27. subject { } ✓ Example(it) (=subject) ✓it{ } should ✓subject{ } should 2009 11 2
  • 28. describe Array do before do @arr = [1,2,3] end it{ @arr.should have(3).items } end 2009 11 2
  • 29. describe Array do before do @arr = [1,2,3] end subject{ @arr } it{ should have(3).items } end 2009 11 2
  • 30. before ✓ before {} ✓ subject{} 2009 11 2
  • 31. its() ✓ 1.2.9 ✓ subject{} its() send 2009 11 2
  • 32. describe Array do before do @arr = [1,2,3] end subject{ @arr.size } it{ should == 3 } end 2009 11 2
  • 33. describe Array do before do @arr = [1,2,3] end subject{ @arr } its(:size){ should == 3 } end 2009 11 2
  • 34. ✓ subject ✓ ✓ CustomMatcher 2009 11 2
  • 35. RSpec ✓ ✓ ✓ 2009 11 2
  • 36. Rails ✓ ✓ ✓ ✓ 2009 11 2
  • 37. (::) 2009 11 2
  • 38. 2009 Rails ✓ ✓ ✓ 2009 11 2
  • 39. 2009 - Model by AR or Ruby RSpec on Rails Controller by AC RSpec on Rails View by Haml or .. RSpec on Rails (many) Helper by AV or .. RSpec on Rails 2009-01-24 Ruby 01 2009 11 2
  • 41. 2009 11 2