Still stuck on the after_create ... some weird return going on

  describe '#after_create' do
    let(:issue) { Issue.new(:subject => "subject", :author => "author") }

    it 'return project details and increase Job count by 1' do
      fake_project = stub()
      fake_project.should_receive(:send_later).with(:refresh_issue_count)
      issue.stub(:project).and_return(fake_project)
      issue.save!
      expect {
        issue.after_create
      }.to change(Delayed::Job :count).by(1)
    end
  end

---- Active record error message

ActiveRecord::AssociationTypeMismatch in 'Issue#after_create return project
details and increase Job count by 1'
User(#-631016628) expected, got String(#-610094588)



On Fri, Nov 15, 2013 at 3:25 PM, Robert Fletcher
<notifications@github.com>wrote:

> In spec/models/issue_spec.rb:
>
> > +        issue.is_chore.should be_true
> > +      end
> > +    end
> > +
> > +    context 'when tracker is not chore' do
> > +      it 'returns false' do
> > +        issue.stub(:tracker).and_return(mock(:chore? => false))
> > +        issue.is_chore.should be_false
> > +      end
> > +    end
> > +  end
> > +
> > +  describe '#updated_status' do
> > +    context 'when status is ready_for_accepted?' do
> > +      it "returns IssueStatus.accepted" do
> > +        issue.ready_for_accepted? == true
>
> These blocks aren't making any assertions, so they can't really fail.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mockdeep/better/pull/24/files#r7705885>
> .
>



-- 
With regards,

David Kim
336-259-4250
[Tw <http://twitter.com/findinbay>] [Li <http://linkedin.com/in/smilingdave>]
[Git <http://dklounge.github.io/>]