Displaying 9 results from an estimated 9 matches for "pivotallabs".
2008 Jan 02
2
Proxies
I really like the idea of Mock Proxies as explained in Brian Takita''s post here:
http://pivots.pivotallabs.com/users/brian/blog/articles/352-introducing-rr
I posted to this list eariler with an incomplete implementation of
.stops_mocking in the thread "Mocking Time, delegating to original
object." The Mock Proxy pattern would make this simpler.
Proxy(User).expects(:find).with(99) # Sets exp...
2011 May 26
1
Changing up some things around Puppet Labs's Open Source Software
...ny of this out yet. If you have any ideas for things
you''d like to see, or comments/suggestions/questions about anything I''ve
mentioned please feel free to bring them up here, or contact me
personally.
[1] http://article.gmane.org/gmane.comp.version-control.git/171013
[2] http://pivotallabs.com/blabs/categories/standup
[3] https://patchwork.puppetlabs.com/
--
Jacob Helwig
2008 May 03
9
Any news on the rSpec books?
I admit it, when it comes to rSpec, I''m lazy. I''ve made a few feeble
attempts to use it, but for once I''m waiting for a book-length
treatment. At least two books were announced, I think. Can anyone in
the know please report on their progress?
Thanks
Michael
--
Michael Schuerig
mailto:michael at schuerig.de
http://www.schuerig.de/michael/
2008 May 20
7
Expect with "real world" returns?
Is there a way to do something like this?
class Foo
def self.hello(name)
"Hello #{name}!"
end
end
Foo.expects(:bar).with("Carl").once
assert_equal "Hello Carl!", Foo.hello
Basically, my problem is that once you set an expectation, the
original code is never executed and is not tested. However, it''s
still very useful to set expectations to
2009 Jan 18
3
ActionMailer and url_for in helper methods
Hi,
I was wondering how to get url_for to work inside ActionMailer. I did
research on the web but I can''t seem to find something that fits what I
need.
In my application, each user can specify their custom domain to access
their. I have an ActionMailer that sends them notifications of changes
that occur. In there, I have a breadcrumbs helper method, which
generages something like:
2012 Mar 12
4
how to design a api?
hi,everyone.
now i start to design a api.
the url like this
http://localhost:3000/api?seckey=123&&post_id=1
the visitor need a seckey to access auth.and get info via json.
so i dont think thats a good api.
i need your answers.thx
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2009 Mar 14
9
null object pattern
I am trying to create a null object in my application. I would like to
assigned a null user object for anonymous/ mot-logged-in user, i.e. if
session variable has nil data.
In my User model, I have created a subclass like this:
class UnassignedUser < User
def save
false
end
def update
false
end
def username
"Unassigned"
end
def county_id
2011 Jan 11
0
Should set_inverse_instance be called earlier in add_record_to_target_with_callbacks ?
Right now when you add a record to an association with << it first
saves the model, and THEN sets the inverse_of association afterward.
This is done inside add_record_to_target_with_callback inside
association_collection.rb.
Is there any reason set_inverse_instance isn''t called before the save
of the model? We are referencing the parent in our save callbacks, so
we''re
2013 Feb 06
0
inverse_of breaks for unsaved child associations during save of parent
I''m willing to write a patch for this issue:
https://github.com/rails/rails/issues/8893
But want to confirm that the new behavior makes sense before I make the
effort.
Essentially if you have an unsaved parent and child, and the parent''s
association to the child has an inverse_of declared on it. When the parent
gets saved, it updates the foreign key on the child, and this