Isolated Fixtures

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.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Isolated Fixtures - Presentation Transcript

    1. Isolated Fixtures Matthew Bellantoni [email_address] Boston Ruby Group March 13, 2007
    2. What is it? Independent fixture sets for each unit and functional Unit::TestCase
    3. Why do I care?
      • Now
      • Create fixtures without breaking tests
      • Create fixtures faster
      • Later
      • Fixtures are easier to understand
    4. How do I install it? 1. Create test/test_helper/fixtures.rb 2. Include from test/test_helper.rb bp = File.dirname(__FILE__) fp = File.expand_path(bp + "/test_helper/fixtures") require fp
    5. How do I use it? 1. Include in your test in place of fixtures require File.dirname(__FILE__) + '/../test_helper' class UserAnalyticsTest < Test::Unit::TestCase isolated_fixtures :users, :active_days def test_something ...
    6. How do I use it? 2. Create fixtures for UserAnalyticsTest test/fixtures/user_analytics/users.yml test/fixtures/user_analytics/active_days.yml
    7. Where can I get the code? http://blog.spotstory.com [email_address]
    8. Notes & Issues
      • Only tested on Rails 1.1.6
      • Rails 1.2 may have solved this problem?
      • Sorta kinda violates DRY?
      • Unacceptably hacky?
    9. Questions or comments?
    10. Isolated Fixtures Matthew Bellantoni [email_address] Boston Ruby Group March 13, 2007

    + matthew_spotstorymatthew_spotstory, 3 years ago

    custom

    1943 views, 1 favs, 2 embeds more stats

    A brief overview of "isolated fixtures": a way to p more

    More Info

    © All Rights Reserved

    Go to text version
    • Total Views 1943
      • 1931 on SlideShare
      • 12 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 0
    Most viewed embeds
    • 11 views on http://blog.spotstory.com
    • 1 views on http://72.14.235.104

    more

    All embeds
    • 11 views on http://blog.spotstory.com
    • 1 views on http://72.14.235.104

    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