Joe,I would test this in 2 steps.
I'd first test that whatever state change (or whatever happens when you User
A clicks the link) takes place.
Then in another test, I'd check that, given a certain state (or again,
whatever is supposed to happen), then User B sees whatever.
HTH,
BJ Clar
is:
'Vidoop::Captcha::Helper rendering a catpcha should build xhtml form
pieces' FAILED
Expected at least 1 element matching "img[src='http://api.vidoop.com/vs/captchas/cpt123/image'
]", found 0.
is not true.
I've tried with_tag as simple as "img" but even
ect should probably necessitate a change in
your views. That's the way it *should* work. However, your views
shouldn't be tightly coupled with each other but they will have to be
coupled in some way or another.
-
BJ Clark
On Apr 19, 2009, at 12:37 PM, Fernando Perez wrot
Fernando,
They are easier to spec with Pat Maddox's "no peeping toms" plugin.
http://github.com/pat-maddox/no-peeping-toms/tree/master
BJ Clark
On May 4, 2009, at 5:33 AM, Fernando Perez wrote:
Hi,
Before I do anything stupid, I'd like to know if there are any gotc
eated a bit, as I should be submitting to /items/1 instead.
Anyway, now how can I trigger the update action in my controller test?
I tried stuff like:
post :update, {:method => 'put', :item => {'1' => {:quantity => 5}}}
put :update, :item => 1 etc.
There are 4 method
de?).and_return(true)
something.should be_true
end
context "not in demo mode" do
@product.stub!(:demoMode?).and_return(false)
something.should_not be_true
end
end
-
BJ Clark
AboutUs.org
With the above spec, the second "it should print hi" test will n
Adam,
What I usually do is extract out the original Time.now call to method
somewhere (with an intention revealing name) and stub out the method
instead of #now itself.
-
BJ Clark
On Jul 13, 2009, at 9:45 AM, Adam Anderson wrote:
So that is what is happening now. Time.now is being
o in these situations.
Its probably not important that Govtpostion receives "new". It's
important that when it receives new with the proper things, and then
saves, that it behaves a certain way. And when it doesn't receive the
proper things, it acts another way.
Hope tha