You cannot post messages because only members can post, and you are not currently a member.
|
Does shoulda support ".should ==" syntax
|
| |
Does shoulda support a syntax like this: should "return weekly hours" do hours = @project.recent_weekly_hours hours.size.should == 52 end I was expecting it to - and thought I had seen it somewhere - but I get "undefined method 'should' " thanks nick
|
|
Cleaning db between tests
|
| |
Sorry if this is a noob question. A day of Google searching hasn't turned up an answer. I just started working on a project that has a test suite built with shoulda. I'm new to shoulda, and I'm seeing a number of failures in the test suite. I've tracked the errors down to records in the db persisting between tests. If I put in explicit calls to clear out the... more »
|
|
stub helper for avoid twitter request
|
| |
Hi folks, I'm using the twitter gem for get my last tweets and I've a
recent_tweets helper in my application_helper, this helper is used in
layout level, then I want to stub this helper and avoid the twitter
request because my tests are very slow, how to I can stub this helper
for all my functional tests?... more »
|
|
Validate uniqueness depends on record
|
| |
Hi!
I have this Request model that I want to test a little bit different
depending on an attribute. The attribute is *local*. So if a Request
is local, I don't want to validate uniqueness of *url*. But I do want
that if the Request is global.
So I thought I would do it like this:
class RequestTest < ActiveSupport::TestCase... more »
|
|
Shoulda equivalent of RSpec's before(:all)
|
| |
I have to unit test a model which has associations to some other
models which are expensive to create. They are currently being
created inside my `setup`, but since this gets executed before every
single `should` statement, my tests take an excruciating amount of
time to run.
I'm looking for a way to initialize these objects exactly once, and... more »
|
|
Help writing DRY test with shoulda
|
| |
Currently I use the following -- Basically same set of assertions on a
bunch of pages.
context "a" do
should "test all pages" do
[post_list_path, post_show_path, post_edit_path].each{|page|
... assertions ...
}
end
end
I want to split that so that I want each test to deal with only one... more »
|
|
testing glob URLs
|
| |
Hello,
I submitted an issue (with patch and tests in my fork) to fix
shoulda's behavior in case of testing glob urls
[link]
Can anyone review it?
Thanks!
|
|
Shoulda and Textmate - how can you get the cmd R trigger to work?
|
| |
Hi everyone,
Does anybody here use Textmate and Shoulda together, running tests
from within Textmate with cmd-R to trigger tests?
I'm getting this error when I try doing this with Shoulda:
LoadError: no such file to load — shoulda
Yet when I run the same commands in terminal, I'm getting the tests... more »
|
|
|