looks like rspec is using the object id rather
than the id from parent_company_attributes. Here's the failure
message:
1)
'Project.create project record should populate company_id' FAILED
expected 1, got 8817400 (using .eql?)
Thanks for any insights
David Currin
Great, thanks for that,
d.
On 04/02/2008, Pat Maddox <[EMAIL PROTECTED]> wrote:
> Extract the company creation to a method, so that that method only
> builds one record at a time. Test that it works properly. Then you
> can keep the test that you have, verifying that it creates the right
> numb
ne a basic implementation of this in the model, but I can't
get this through to rspec.
On 04/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Feb 4, 2008 5:24 AM, David Currin <[EMAIL PROTECTED]> wrote:
> > I'm having trouble working out how to test a metho
I'm having trouble working out how to test a method that contains a
loop. I'm new to rspec so not sure what the best way is to tackle
this.
class Company < ActiveRecord::Base
def self.sync_with_basecamp
companies = basecamp_fetch("companies")
companies.each do |c|
company = self.find_or_
David Chelimsky wrote:
> On 10/11/07, Brandon Keepers <[EMAIL PROTECTED]> wrote:
>> >>> bundle.
>> >> Opening a simple spec file and running the run behaviour description,
>> >
>> I can also confirm issues with the RSpec TextMate bundle as of this
>> from /opt/local/lib/ruby/gems/1.8/gems/b