Cucumbers & Factory Girls

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

2 comments

Comments 1 - 2 of 2 previous next Post a comment

  • + toolmantim Tim Lucas 4 months ago
    the intention was to have sound as well, but the recording never worked. Sorry!
  • + guest6856a5a0 guest6856a5a0 4 months ago
    Great. Another presentation which is near-useless without the narrative.
Post a comment
Embed Video
Edit your comment Cancel

9 Favorites

Cucumbers & Factory Girls - Presentation Transcript

  1. CUCUMBERS! AND FACTORY GIRLS
  2. CUCUMBER
  3. STORIES
  4. 210 SCENARIOS
  5. BIG BULLSHIT NUMBERS
  6. In order to show the world how cool they are A user Should be able to edit and update their personal details
  7. RSPEC STORIES
  8. As a user I want to edit and update my personal details So that I can show the world how cool I am
  9. OLD SCHOOL
  10. GOOD OLD SCHOOL PHOTO BY: flickr.com/people/rumberodesign
  11. BAD OLD SCHOOL
  12. BENEFITS OF CUCUMBER?
  13. HIGH WATER CONTENT
  14. SKIN IS RICH IN FIBER
  15. REGULATE BLOOD PRESSURE
  16. RUBY + CUCUMBERS?
  17. JAPAN + CUCUMBERS?
  18. http://www.youtube.com/watch?v=fBsyBjQuX6E http://www.youtube.com/watch?v=U3OxKdDxkpg
  19. http://github.com/aslakhellesoy/cucumber/
  20. DEMO: WEBJAM http://github.com/webjam/webjam - rake features
  21. /features
  22. /features/*.feature
  23. Story: Viewing the home page As a visitor I want to visit the home page So that I can see all the cool stuff Scenario: not logged in Given I am not logged in When I view the home page Then I see the page /features/home.feature
  24. /features/steps
  25. /features/steps/*_steps.rb
  26. When \"I view the home page\" do get home_path end /features/home_steps.rb
  27. Then \"I see the page\" do response.code.should == \"200\" end /features/response_steps.rb
  28. FEATURES
  29. RUBY
  30. RAILS INTEGRATION
  31. TREETOP
  32. STORY RUNNER COMPATIBLE
  33. FIT TABLES
  34. Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers Scenario: Add two numbers Given I have entered 50 into the calculator And I have entered 70 into the calculator When I press add Then the result should be 120 on the screen And the result class should be Fixnum | input_1 | input_2 | button | output | class | | 20 | 30 | add | 50 | Fixnum | | 2 | 5 | add | 7 | Fixnum | | 0 | 40 | add | 40 | Fixnum |
  35. Before do @calc = Calculator.new end After do end Given \"I have entered $n into the calculator\" do |n| @calc.push n.to_i end When /I press (\\w+)/ do |op| @result = @calc.send op end Then /the result should be (.*) on the screen/ do |result| @result.should == result.to_f end Then /the result class should be (\\w*)/ do |class_name| @result.class.name.should == class_name end
  36. Before do @calc = Calculator.new end After do end Given \"I have entered $n into the calculator\" do |n| @calc.push n.to_i end When /I press (\\w+)/ do |op| @result = @calc.send op end Then /the result should be (.*) on the screen/ do |result| @result.should == result.to_f end Then /the result class should be (\\w*)/ do |class_name| @result.class.name.should == class_name end
  37. Before do @calc = Calculator.new end After do end Given \"I have entered $n into the calculator\" do |n| @calc.push n.to_i end When /I press (\\w+)/ do |op| @result = @calc.send op end Then /the result should be (.*) on the screen/ do |result| @result.should == result.to_f end Then /the result class should be (\\w*)/ do |class_name| @result.class.name.should == class_name end
  38. Before do @calc = Calculator.new end After do end Given \"I have entered $n into the calculator\" do |n| @calc.push n.to_i end When /I press (\\w+)/ do |op| @result = @calc.send op end Then /the result should be (.*) on the screen/ do |result| @result.should == result.to_f end Then /the result class should be (\\w*)/ do |class_name| @result.class.name.should == class_name end
  39. Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers Scenario: Add two numbers Given I have entered 50 into the calculator And I have entered 70 into the calculator When I press add Then the result should be 120 on the screen And the result class should be Fixnum | input_1 | input_2 | button | output | class | | 20 | 30 | add | 50 | Fixnum | | 2 | 5 | add | 7 | Fixnum | | 0 | 40 | add | 40 | Fixnum |
  40. Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers Scenario: Add two numbers Given I have entered 50 into the calculator And I have entered 70 into the calculator When I press add Then the result should be 120 on the screen And the result class should be Fixnum | input_1 | input_2 | button | output | class | | 20 | 30 | add | 50 | Fixnum | | 2 | 5 | add | 7 | Fixnum | | 0 | 40 | add | 40 | Fixnum |
  41. GETTING STARTED WITH RAILS
  42. INSTALL PLUGIN
  43. ./script/generate cucumber
  44. FACTORY GIRL
  45. INSTANTIATING MODELS
  46. FIXTURELESS
  47. SPECS and/or STORIES
  48. HORNSBY LACHIE (LACHIE COX)
  49. MACHINIST NOTAHAT (PETE YANDELL)
  50. AGAIN, WEBJAM http://github.com/webjam/webjam/tree/master/spec/factories.rb
  51. Factory.define :presentation, :class => Jam do |p| p.title 'Preso title' p.description 'Preso description' p.number {Factory.next(:jam_number)} p.users {|u| [u.association(:user)]} p.association :event end
  52. When \"I view an event presentation page\" do @event = Factory.create(:past_event) @presentation = Factory.create(:presentation, :event => @event) get event_presentation_path(@event, @presentation) end
  53. ASSOCIATIONS
  54. SEQUENCES
  55. TIM LUCAS TWITTER.COM/TOOLMANTIM TOOLMANTIM.COM

+ Tim LucasTim Lucas, 9 months ago

custom

4195 views, 9 favs, 0 embeds more stats

Presentation I gave at the October Sydney RORO meet more

More Info

© All Rights Reserved

Go to text version
  • Total Views 4195
    • 4195 on SlideShare
    • 0 from embeds
  • Comments 2
  • Favorites 9
  • Downloads 102
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories