<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/shoulda</id>
  <title type="text">shoulda Google Group</title>
  <subtitle type="text">
  Discussion surrounding the Shoulda testing plugin for Ruby on Rails applications. For information on Shoulda, visit http://thoughtbot.com/projects/shoulda.
  </subtitle>
  <link href="/group/shoulda/feed/atom_v1_0_msgs.xml" rel="self" title="shoulda feed"/>
  <updated>2010-01-03T15:49:34Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>Bill Kirtley</name>
  <email>bill.kirt...@gmail.com</email>
  </author>
  <updated>2010-01-03T15:49:34Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/eced6a6087a55601?show_docid=eced6a6087a55601</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/eced6a6087a55601?show_docid=eced6a6087a55601"/>
  <title type="text">Re: [shoulda] Re: Does shoulda support &quot;.should ==&quot; syntax</title>
  <summary type="html" xml:space="preserve">
  Use test/spec for that nice syntax: &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://test-spec.rubyforge.org/test-spec/&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>nick</name>
  <email>nick.mcfarl...@gmail.com</email>
  </author>
  <updated>2010-01-01T10:20:54Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/867699f35e08f383?show_docid=867699f35e08f383</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/867699f35e08f383?show_docid=867699f35e08f383"/>
  <title type="text">Re: Does shoulda support &quot;.should ==&quot; syntax</title>
  <summary type="html" xml:space="preserve">
  Yes, you&#39;re right. It is in rspec and not shoulda. Shame cos it&#39;s a &lt;br&gt; nice way to write tests. &lt;br&gt; Thanks &lt;br&gt; Nick
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ryan Angilly</name>
  <email>r...@angilly.com</email>
  </author>
  <updated>2009-12-31T17:09:26Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/cd9374371bfb79a3?show_docid=cd9374371bfb79a3</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/cd9374371bfb79a3?show_docid=cd9374371bfb79a3"/>
  <title type="text">Re: [shoulda] Does shoulda support &quot;.should ==&quot; syntax</title>
  <summary type="html" xml:space="preserve">
  I believe that&#39;s rspec, not shoulda.
  </summary>
  </entry>
  <entry>
  <author>
  <name>nick</name>
  <email>nick.mcfarl...@gmail.com</email>
  </author>
  <updated>2009-12-31T16:59:58Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/24e30b9dcdb3770c?show_docid=24e30b9dcdb3770c</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/1a6ad0a7661786c1/24e30b9dcdb3770c?show_docid=24e30b9dcdb3770c"/>
  <title type="text">Does shoulda support &quot;.should ==&quot; syntax</title>
  <summary type="html" xml:space="preserve">
  Does shoulda support a syntax like this: &lt;br&gt; should &amp;quot;return weekly hours&amp;quot; do &lt;br&gt; hours = @project.recent_weekly_hours &lt;br&gt; hours.size.should == 52 &lt;br&gt; end &lt;br&gt; I was expecting it to - and thought I had seen it somewhere - but I &lt;br&gt; get &amp;quot;undefined method &#39;should&#39; &amp;quot; &lt;br&gt; thanks &lt;br&gt; nick
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael Breen</name>
  <email>hard...@gmail.com</email>
  </author>
  <updated>2009-12-24T14:15:06Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/28eb0bab26dc52d7/2d5b3ff4971e4d91?show_docid=2d5b3ff4971e4d91</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/28eb0bab26dc52d7/2d5b3ff4971e4d91?show_docid=2d5b3ff4971e4d91"/>
  <title type="text">Re: [shoulda] macros don&#39;t work: undefined method `should_assign_to&#39; for FoodEntryControllerTest::Subclass_1:Class (NoMethodError)</title>
  <summary type="html" xml:space="preserve">
  I&#39;m pretty sure that Shoulda won&#39;t load the rails macros if Spec is defined. Check out rails/init.rb: &lt;br&gt; if RAILS_ENV == &#39;test&#39; &lt;br&gt; if defined? Spec &lt;br&gt; require &#39;shoulda/rspec&#39; &lt;br&gt; else &lt;br&gt; require &#39;shoulda/rails&#39; &lt;br&gt; end &lt;br&gt; end &lt;br&gt; so it looks like it&#39;s one or the other. &lt;br&gt; Best. &lt;br&gt; Mike
  </summary>
  </entry>
  <entry>
  <author>
  <name>oren</name>
  <email>orengo...@gmail.com</email>
  </author>
  <updated>2009-12-24T07:38:20Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/28eb0bab26dc52d7/bce51e5cc07779d4?show_docid=bce51e5cc07779d4</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/28eb0bab26dc52d7/bce51e5cc07779d4?show_docid=bce51e5cc07779d4"/>
  <title type="text">macros don&#39;t work: undefined method `should_assign_to&#39; for FoodEntryControllerTest::Subclass_1:Class (NoMethodError)</title>
  <summary type="html" xml:space="preserve">
  ruby 1.9.1p243, rails 2.3.5, thoughtbot-shoulda 2.10.2. &lt;br&gt; my spec, using macros: &lt;br&gt; class FoodEntryControllerTest &amp;lt; ActionController::TestCase &lt;br&gt; context &amp;quot;on GET new&amp;quot; do &lt;br&gt; setup do &lt;br&gt; @food_entry = FoodEntry.new &lt;br&gt; get :new &lt;br&gt; end &lt;br&gt; should_assign_to :food_entry &lt;br&gt; end &lt;br&gt; end &lt;br&gt; the error: &lt;br&gt; /home/oren/weighmyplate/spec/c ontrollers/food_entry_controll er_spec.rb:
  </summary>
  </entry>
  <entry>
  <author>
  <name>juanpaco</name>
  <email>juanp...@gmail.com</email>
  </author>
  <updated>2009-12-22T18:30:08Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/a2da2f8265d951c7/908ebfdc43cec49a?show_docid=908ebfdc43cec49a</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/a2da2f8265d951c7/908ebfdc43cec49a?show_docid=908ebfdc43cec49a"/>
  <title type="text">Re: Cleaning db between tests</title>
  <summary type="html" xml:space="preserve">
  I found another user with the same problem. My db had MyISAM tables, &lt;br&gt; so there was no transaction support to roll back. &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://blog.e-thang.net/?p=65&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; Short answer: problem solved.
  </summary>
  </entry>
  <entry>
  <author>
  <name>juanpaco</name>
  <email>juanp...@gmail.com</email>
  </author>
  <updated>2009-12-22T15:18:25Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/a2da2f8265d951c7/78d0a5768b1a513e?show_docid=78d0a5768b1a513e</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/a2da2f8265d951c7/78d0a5768b1a513e?show_docid=78d0a5768b1a513e"/>
  <title type="text">Cleaning db between tests</title>
  <summary type="html" xml:space="preserve">
  Sorry if this is a noob question. A day of Google searching hasn&#39;t &lt;br&gt; turned up an answer. &lt;br&gt; I just started working on a project that has a test suite built with &lt;br&gt; shoulda. I&#39;m new to shoulda, and I&#39;m seeing a number of failures in &lt;br&gt; the test suite. I&#39;ve tracked the errors down to records in the db &lt;br&gt; persisting between tests. If I put in explicit calls to clear out the
  </summary>
  </entry>
  <entry>
  <author>
  <name>rdavila</name>
  <email>ruben.grung...@gmail.com</email>
  </author>
  <updated>2009-11-29T01:02:53Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/acba823093927e66/eb55c0aed0ac137e?show_docid=eb55c0aed0ac137e</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/acba823093927e66/eb55c0aed0ac137e?show_docid=eb55c0aed0ac137e"/>
  <title type="text">Re: stub helper for avoid twitter request</title>
  <summary type="html" xml:space="preserve">
  Very thanks Michael, Fakeweb saves the day!
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael Breen</name>
  <email>hard...@gmail.com</email>
  </author>
  <updated>2009-11-28T14:05:59Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/acba823093927e66/d90299ea4432d19b?show_docid=d90299ea4432d19b</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/acba823093927e66/d90299ea4432d19b?show_docid=d90299ea4432d19b"/>
  <title type="text">Re: [shoulda] stub helper for avoid twitter request</title>
  <summary type="html" xml:space="preserve">
  You may want to think about stubbing the HTTP request to Twitter using webmock[1] or fakeweb[2] instead of stubbing your helper. &lt;br&gt; &lt;p&gt;Best, &lt;br&gt; Mike &lt;br&gt; &lt;p&gt;[1] &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://github.com/bblimke/webmock&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; [2] &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://github.com/chrisk/fakeweb/&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>rdavila</name>
  <email>ruben.grung...@gmail.com</email>
  </author>
  <updated>2009-11-28T01:49:27Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/acba823093927e66/cfd2edf946c95352?show_docid=cfd2edf946c95352</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/acba823093927e66/cfd2edf946c95352?show_docid=cfd2edf946c95352"/>
  <title type="text">stub helper for avoid twitter request</title>
  <summary type="html" xml:space="preserve">
  Hi folks, I&#39;m using the twitter gem for get my last tweets and I&#39;ve a &lt;br&gt; recent_tweets helper in my application_helper, this helper is used in &lt;br&gt; layout level, then I want to stub this helper and avoid the twitter &lt;br&gt; request because my tests are very slow, how to I can stub this helper &lt;br&gt; for all my functional tests?
  </summary>
  </entry>
  <entry>
  <author>
  <name>rejeep</name>
  <email>johan.rej...@gmail.com</email>
  </author>
  <updated>2009-11-24T07:30:42Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/c1a6ead16db5508a?show_docid=c1a6ead16db5508a</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/c1a6ead16db5508a?show_docid=c1a6ead16db5508a"/>
  <title type="text">Re: Validate uniqueness depends on record</title>
  <summary type="html" xml:space="preserve">
  Maybe there&#39;s a better way to do it? What I&#39;m trying to test is this: &lt;br&gt; validates_uniqueness_of :url, :unless =&amp;gt; :local? &lt;br&gt; validates_uniqueness_of :url, :if =&amp;gt; :local?, :scope =&amp;gt; :user_id
  </summary>
  </entry>
  <entry>
  <author>
  <name>rejeep</name>
  <email>johan.rej...@gmail.com</email>
  </author>
  <updated>2009-11-23T06:42:31Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/01edffecbe145d1f?show_docid=01edffecbe145d1f</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/01edffecbe145d1f?show_docid=01edffecbe145d1f"/>
  <title type="text">Re: Validate uniqueness depends on record</title>
  <summary type="html" xml:space="preserve">
  Sorry if I was unclear. There&#39;s no error, but the test fails with &lt;br&gt; this: &lt;br&gt; Expected errors to include &amp;quot;has already been taken&amp;quot; when url is set to &lt;br&gt; &amp;quot;&lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://domain.com&quot;&gt;[link]&lt;/a&gt;&amp;quot;, got no errors &lt;br&gt; &lt;p&gt;Your suggestion didn&#39;t work. &lt;br&gt; &lt;p&gt;On Nov 23, 3:58 am, François Beausoleil
  </summary>
  </entry>
  <entry>
  <author>
  <name>François Beausoleil</name>
  <email>francois.beausol...@gmail.com</email>
  </author>
  <updated>2009-11-23T03:58:00Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/e841d8f655784f4d?show_docid=e841d8f655784f4d</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/e841d8f655784f4d?show_docid=e841d8f655784f4d"/>
  <title type="text">Re: [shoulda] Validate uniqueness depends on record</title>
  <summary type="html" xml:space="preserve">
  You don&#39;t show any error messages, so I&#39;m not too sure. I believe #subject is a class method, so you&#39;d do it this way: &lt;br&gt; &lt;p&gt;context &amp;quot;a global request&amp;quot; do &lt;br&gt; subject do &lt;br&gt; @subject ||= Factory(:request, :local =&amp;gt; false) &lt;br&gt; end &lt;br&gt; &lt;p&gt; should_validate_uniqueness_of :url &lt;br&gt; end &lt;br&gt; &lt;p&gt;RDoc for #subject: &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://rdoc.info/rdoc/thoughtbot/shoulda/blob/21ce037d1228a5f56deac79c55049e33f8dda5ae/Shoulda/ClassMethods.html#subject-instance_method&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>rejeep</name>
  <email>johan.rej...@gmail.com</email>
  </author>
  <updated>2009-11-22T16:42:17Z</updated>
  <id>http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/a6fde7ef03013301?show_docid=a6fde7ef03013301</id>
  <link href="http://groups.google.com/group/shoulda/browse_thread/thread/af8a76718b8fb79d/a6fde7ef03013301?show_docid=a6fde7ef03013301"/>
  <title type="text">Validate uniqueness depends on record</title>
  <summary type="html" xml:space="preserve">
  Hi! &lt;br&gt; &lt;p&gt;I have this Request model that I want to test a little bit different &lt;br&gt; depending on an attribute. The attribute is *local*. So if a Request &lt;br&gt; is local, I don&#39;t want to validate uniqueness of *url*. But I do want &lt;br&gt; that if the Request is global. &lt;br&gt; &lt;p&gt;So I thought I would do it like this: &lt;br&gt; class RequestTest &amp;lt; ActiveSupport::TestCase
  </summary>
  </entry>
</feed>
