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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

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