Re: [rspec-users] Fixtures are not loaded while running controller spec

2009-06-11 Thread Amit Kulkarni
> describe BbPostsController do > context "test" do > fixtures :bb_posts, :users > it "should create post" do > User.find_by_login("amit").should_not be_nil > post = create_post > post.should be_valid > end > end > end > > (that's an odd spec but let's try to get

Re: [rspec-users] Fixtures are not loaded while running controller spec

2009-06-11 Thread Amit Kulkarni
David Chelimsky wrote: > On Thu, Jun 11, 2009 at 11:50 AM, Amit Kulkarni > wrote: >> � require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') >> � �if @user >> �id: 1 >> amit: >> I dont know what is wrong. >> Please suggest :-) > > Make sure that the fixtures are in the same place t

Re: [rspec-users] Fixtures are not loaded while running controller spec

2009-06-11 Thread Pat Maddox
On Thu, Jun 11, 2009 at 9:50 AM, Amit Kulkarni wrote: > describe BbPostsController do >  context "test" do >    fixtures :bb_posts, :users >   �...@user = User.find_by_login("amit") >    if @user >      it "should create post" do >        post = create_post >        post.should be_valid >      end

Re: [rspec-users] Fixtures are not loaded while running controller spec

2009-06-11 Thread David Chelimsky
On Thu, Jun 11, 2009 at 11:50 AM, Amit Kulkarni wrote: > Hi, > >   I am running controller spec and it gives me result as 0 examples, 0 > failures. > >   I checked into the database and i saw that fixtures are not loaded. > >   Following are the details of my controller file. > > >   require File.e

[rspec-users] Fixtures are not loaded while running controller spec

2009-06-11 Thread Amit Kulkarni
Hi, I am running controller spec and it gives me result as 0 examples, 0 failures. I checked into the database and i saw that fixtures are not loaded. Following are the details of my controller file. require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') def valid_bb_