<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://wiki.merbivore.com/lib/exe/css.php?s=feed" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Merb Wiki testing</title>
    <subtitle></subtitle>
    <link rel="alternate" type="text/html" href="http://wiki.merbivore.com/"/>
    <id>http://wiki.merbivore.com/</id>
    <updated>2010-08-21T18:35:56-07:00</updated>
    <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
<link rel="self" type="application/atom+xml" href="http://wiki.merbivore.com/feed.php" />
    <entry>
        <title>Autocreating/autoupdating your database on spec run</title>
        <link rel="alternate" type="text/html" href="http://wiki.merbivore.com/testing/datamapper?rev=1232577268&amp;do=diff"/>
        <published>2009-01-21T14:34:28-07:00</published>
        <updated>2009-01-21T14:34:28-07:00</updated>
        <id>http://wiki.merbivore.com/testing/datamapper?rev=1232577268&amp;do=diff</id>
        <summary>Specs not running because of your non-existent test database?  Tired of setting your environment to test and running rake db:automigrate?  Try adding the following to your spec/spec_helper.rb in Spec::Runner.config block:


  config.before(:all) do
    DataMapper.auto_migrate!
  end</summary>
    </entry>
    <entry>
        <title>Testing full stack requests</title>
        <link rel="alternate" type="text/html" href="http://wiki.merbivore.com/testing/request_specs?rev=1226656193&amp;do=diff"/>
        <published>2008-11-14T01:49:53-07:00</published>
        <updated>2008-11-14T01:49:53-07:00</updated>
        <id>http://wiki.merbivore.com/testing/request_specs?rev=1226656193&amp;do=diff</id>
        <summary>See Yehuda Katz's presentation slides from MerbCamp.

Mocking and stubbing are frowned upon by the core team when it comes to request testing, here is an example of how to test a controller and views going through the entire stack.

A blog post by atmos explains the concepts and rationale behind this style of testing.</summary>
    </entry>
    <entry>
        <title>testing:rspec</title>
        <link rel="alternate" type="text/html" href="http://wiki.merbivore.com/testing/rspec?rev=1232904147&amp;do=diff"/>
        <published>2009-01-25T09:22:27-07:00</published>
        <updated>2009-01-25T09:22:27-07:00</updated>
        <id>http://wiki.merbivore.com/testing/rspec?rev=1232904147&amp;do=diff</id>
        <summary>Testing Merb Controllers with RSpec @ RailsTips

An updated controller testing guide (by Atmos)</summary>
    </entry>
    <entry>
        <title>View Matchers</title>
        <link rel="alternate" type="text/html" href="http://wiki.merbivore.com/testing/view_matchers?rev=1226525808&amp;do=diff"/>
        <published>2008-11-12T13:36:48-07:00</published>
        <updated>2008-11-12T13:36:48-07:00</updated>
        <id>http://wiki.merbivore.com/testing/view_matchers?rev=1226525808&amp;do=diff</id>
        <summary>By default, Merb generate a request spec per generated controller. You might have noticed the have_xpath matcher.
You have more matchers available:


  have_content  # checks that the document contains some specfic text
  have_selector # checks that a css selector is available (css3 supported)
  have_tag      # checks that a tag is available
  have_xpath    # checks that a xpath element is available</summary>
    </entry>
</feed>
