>
> Date: Sun, 21 Feb 2010 10:37:14 +
> From: Andrew Premdas
> To: rspec-users
> Subject: Re: [rspec-users] Do you still Write Tests First on code that
>is churning hard?
> Message-ID:
><88fd8ddc1002210237m39085abbo6c43a7dc34130...@mail.gmail.com>
> Content-Type: text/pla
I am hoping that this is an easy question to answer!
I have 2 models, related via an association model, such that models a and b
use has_many to refer to each other, and also the association.
(Thats as simple as the code is)
When I try to write a simple spec to access model 2 from model 1 I am
g
What I do is to mock and stub the associated models. The current model that
I work on is called, usually using a Factory Girl. Hope this helps.
On Mon, Feb 22, 2010 at 8:54 PM, Matt Riches wrote:
> I am hoping that this is an easy question to answer!
>
> I have 2 models, related via an associati
Hi,
I have an issue with rSpec when spec'ing a module. The module in
question looks like this:
module Sheep
def self.sound
@sound ||= produce_sound()
end
end
This module is used all around the application (and corresponding
specs) and somehow values of @sound leak between each spec. The
Hi rspec,
Check out the books I added on Goodreads.
http://www.goodreads.com/friend/i?n=rspec
users&e=rspec-us...@rubyforge.org&i=LTM2MDQzNDk4OTE6MzY4
- Pat
(pat.ey...@gmail.com)
Goodreads is a community for book lovers. It's a great way to get book
recommendations from your f
Addendum: I'm using rspec 1.3.0, rspec-rails 1.3.2 and ruby 1.9.1p129
On Feb 22, 8:45 pm, Harm wrote:
> Hi,
>
> I have an issue with rSpec when spec'ing a module. The module in
> question looks like this:
>
> module Sheep
> def self.sound
> @sound ||= produce_sound()
> end
> end
>
> This
On Feb 22, 2010, at 1:54 PM, Matt Riches wrote:
> I am hoping that this is an easy question to answer!
>
> I have 2 models, related via an association model, such that models a and b
> use has_many to refer to each other, and also the association.
has_many :through with an extra table, or HABT
>
> > I am hoping that this is an easy question to answer!
> >
> > I have 2 models, related via an association model, such that models a and
> b use has_many to refer to each other, and also the association.
>
> has_many :through with an extra table, or HABTM?
>
> Im home now and dont have the code
Any thoughts on how to get the matchers included?
On Feb 21, 4:23 pm, drewB wrote:
> I require webrat in spec_helper (Spork.prefork).
>
> versions:
>
> rails 2.1.2
> rspec 1.3.0
> rspec-rails 1.3.2
> ruby 1.8.7
>
> The file is located at 'spec/integration/landing_page/
> Ianding_page_spec.rb'. I
On 22 Feb 2010, at 19:45, Harm wrote:
Hi,
I have an issue with rSpec when spec'ing a module. The module in
question looks like this:
module Sheep
def self.sound
@sound ||= produce_sound()
end
end
This module is used all around the application (and corresponding
specs) and somehow values
I thought that it might be worth starting a discussion about the best
approaches to deal with spec'ing what's becoming more and more common
in apps using active record.
It started with named scopes, now we have arel, and the old find calls
with parameters are being deprecated.
When I watched Ryan
On Feb 22, 2010, at 6:07 PM, Rick DeNatale wrote:
> I thought that it might be worth starting a discussion about the best
> approaches to deal with spec'ing what's becoming more and more common
> in apps using active record.
>
> It started with named scopes, now we have arel, and the old find ca
On Mon, Feb 22, 2010 at 6:16 PM, Scott Taylor wrote:
> I haven't spent enough time with it yet to know, but I suspect that surface
> mocking (what is usually called stubbing in this community) is going to get
> harder with the demeter violations.
>
One of the things that I tend to do, is to no
>From a mocking / stubbing perspective, how is this different from
Article.all(:conditions => ['published_at <= ?', Time.now], :include =>
:comments)
?
i.e. in both cases wouldn't you do
class Article
def self.active_published
all :conditions => ['published_at <= ?', Time.now], :include =>
I'm using this setup with rails 3/1.9.1 and this aforementioned gem.
However, when running rake spec, I get this error:
no such file to load -- test/unit/assertionfailederror
seems 1.9.1 no longer has this file. I tested running it with
commenting out this requirement and simply adding the below
15 matches
Mail list logo