On the other hand, earlier today my pair and I had to override a
find_by_param method. We quickly wrote it down:
def find_by_param(val)
find_by_id val
end
We were puzzled, then saw that it should be User.find_by_param.
Who'da thunk.
Pat
On Thu, Mar 13, 2008 at 10:42 PM, __iso __ [EMAIL
On Fri, Mar 14, 2008 at 1:31 AM, Shane Mingins [EMAIL PROTECTED] wrote:
Hi
We have specs in our rails project other than model/view/controller ..
we have interests and lib ...
using use_transactional_fixtures = true seems fine in a spec in the m/
v/c and interests directories but not in
Hi!
I'm experiencing such error while running simple model rspec just to
make sure everything is working.
$ script/spec spec/models/site_user_spec.rb
/var/lib/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
`const_missing': uninitialized constant Spec::Rails
This hints at another extension I've wanted to write for us for a while.
Common html selector strings, Labels, input fields, textareas, forms,
links, etc
Really just rolling up something like:
response.should have_tag(input[type=text][name=?][value=?][id=company-
name], user[company_name],
I'm trying to specify that a particular view must render two different
partials.
My spec looks like:
describe AClass do
it do
template.should_receive(:render).with(:partial = 'foo', :locals = { ...
})
...
end
describe 'some conditional case' do
it do
Zach,
On 3/14/08, Zach Moazeni [EMAIL PROTECTED] wrote:
This hints at another extension I've wanted to write for us for a while.
Common html selector strings, Labels, input fields, textareas, forms,
links, etc
Really just rolling up something like:
My pair and I have written a bunch of these helpers. I'll post what we
have later, perhaps it will be a starting point,
Zach
On Fri, Mar 14, 2008 at 8:20 AM, Zach Moazeni [EMAIL PROTECTED] wrote:
This hints at another extension I've wanted to write for us for a while.
Common html selector
Stub out the first one, something like
template.stub!(:render)
Then, each of your tests set the actual should_receive expectation.
-Corey
On Fri, Mar 14, 2008 at 8:44 AM, Alan Larkin [EMAIL PROTECTED] wrote:
I'm trying to specify that a particular view must render two different
partials.
Corey Haines wrote:
Stub out the first one, something like
template.stub!(:render)
Then, each of your tests set the actual should_receive expectation.
-Corey
On Fri, Mar 14, 2008 at 8:44 AM, Alan Larkin [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
I'm trying to specify
seems like it'd make sense to just add this to http://code.google.com/
p/rspec-on-rails-matchers/
linoj
On Mar 14, 2008, at 8:48 AM, Brandon Keepers wrote:
Zach,
On 3/14/08, Zach Moazeni [EMAIL PROTECTED] wrote:
This hints at another extension I've wanted to write for us for a
while.
thanks, will do - I am still wrapping my mind around mocks and stubs indeed :)
2008/3/13, Pat Maddox [EMAIL PROTECTED]:
On Thu, Mar 13, 2008 at 4:55 PM, Oliver Barnes
[EMAIL PROTECTED] wrote:
I see. I had gotten to trying the first way you suggested (haven't
tried the second yet):
should have posted the code, sorry about that :)
http://pastie.caboo.se/165708
I was actually posting to :create, but hadn't added do_post() to the example :P
adding it solved this specific problem, thanks. hope the pastie helps
another newb out
2008/3/13, Shane Mingins [EMAIL PROTECTED]:
And
Folks,
I was wondering if someone would be able to help me out with a quandry.
I'm trying to write an rspec plugin module for merb that will run all
specs within an ActiveRecord (initially) database transaction - to
give functionality similar to rails transactional fixtures.
Here is the module:
Hi all,
Part of the integration test suite involves running against a sandbox
on Paypal's server.
Lately that server's been acting flakely. It doesn't fail all the
time, but enough to confuse people.
I made pending some tests that looked like they were repeat offenders,
but now I'm seeing the
At the top of the file put...
__END__
Zach
On Fri, Mar 14, 2008 at 1:46 PM, Will Sargent [EMAIL PROTECTED] wrote:
Hi all,
Part of the integration test suite involves running against a sandbox
on Paypal's server.
Lately that server's been acting flakely. It doesn't fail all the
time,
Zach Dennis wrote:
When I write software for myself I tend to flip flop. Sometimes I am
writing things to learn or play and I don't test.
I did that on a recent small project and I was amazed at how fast I was
able to get things done.
Here's another perspective to look at it from. When you
I'm trying to use stories to drive some high-level design.
I've got some branching scenarios where I want to follow a scenario,
to establish a base situation, and then have different scenarios which
'branch' out from that state, possibly several levels deep.
I asked a bit about this a few days
I really agree with the topic starter. I've always done the rspec testing
with all layers in isolation, a bit like the first example.
Now for my latest project I went a bit for a more TDD approach, sending a
request to a controller and testing the full stack, including the dynamic
bits of the
On Fri, Mar 14, 2008 at 2:08 PM, __iso __ [EMAIL PROTECTED] wrote:
Zach Dennis wrote:
When I write software for myself I tend to flip flop. Sometimes I am
writing things to learn or play and I don't test.
I did that on a recent small project and I was amazed at how fast I was
able to
On Mar 14, 2008, at 1:46 PM, Will Sargent wrote:
Hi all,
Part of the integration test suite involves running against a sandbox
on Paypal's server.
Lately that server's been acting flakely. It doesn't fail all the
time, but enough to confuse people.
I made pending some tests that looked
Zach Dennis wrote:
Can someone change this implementation and still have your tests pass,
but have the implementation be broken? If they can then yes it is
worth the 40 lines.
It is partly this paranoia of someone changing the code that makes me
question testing of this magnitude. Other
21 matches
Mail list logo