Re: [rspec-users] spec_server not reloading model classes

2009-03-29 Thread Scott Taylor
Andrew Vit wrote: Hi, I'm using the latest rspec-rails 1.2.2 with rails 2.3.2, and I'm trying to get it to work with spec_server. This is on Mac/Leopard, with the stock ruby, all gems installed in /Library/Ruby/. I have configured: # config/environments/test.rb config.cache_classes = false # s

Re: [rspec-users] spec_server not reloading model classes

2009-03-29 Thread Andrew Vit
I just tried it with: $ rake RAILS_ENV=development spec:server:start $ RAILS_ENV=development script/autospec And it looks the same. (If I change the model file, the tests re-run but it obviously doesn't get reloaded: even if I add a syntax error, it still runs.) Not sure where you mean about the

Re: [rspec-users] spec_server not reloading model classes

2009-03-29 Thread Scott Taylor
Andrew Vit wrote: I just tried it with: $ rake RAILS_ENV=development spec:server:start $ RAILS_ENV=development script/autospec Actually I meant poking around your app with a browser in dev mode ;) I'm pretty sure that rails will still try to run the test environment, even with RAILS_ENV s

Re: [rspec-users] spec_server not reloading model classes

2009-03-29 Thread Andrew Vit
On Mar 29, 1:40 am, Scott Taylor wrote: > Actually I meant poking around your app with a browser in dev mode ;) Ok, I get it, I wasn't sure what you were driving at! ;-) Yes, everything is reloading fine in the browser under development. > I'm pretty sure that rails will still try to run the t

Re: [rspec-users] flash.now

2009-03-29 Thread Peter Jaros
2009/3/28 Yi : > How can I test flash.now[:key] is being set in a controller test? Both > flash[:key] and flash.now[:key].should == message didn't work > > I can use response.session["flash"][:key].should == message . Just looks bad That's odd. In a controller example, you should have a #flash m

Re: [rspec-users] autospec fails but rake spec tasks pass (solution)

2009-03-29 Thread jakepaul
I figured out what the problem was. Turns out that the controller specs used Mocha's any_instance method to stub valid? and return false (I got this idea from a Railscast). Due to the order in which autospec runs the specs, editing the model spec was causing it to be run after the controller spec,

[rspec-users] [Rails] specifying that a layout yields?

2009-03-29 Thread Brandt Kurowski
I recently had a bug in a layout due to the layout not calling "yield" to display the actual content. I wanted to write a spec to describe what was missing, but it wasn't obvious how, so I just fixed the problem first and doubled back to spec it later. Anyway, the most succinct thing I was able to

Re: [rspec-users] flash.now

2009-03-29 Thread Ben Mabey
Yi wrote: Hi, How can I test flash.now[:key] is being set in a controller test? Both flash[:key] and flash.now[:key].should == message didn't work I can use response.session["flash"][:key].should == message . Just looks bad Thanks Yi -- http://yiwenandsoftware.wordpress.com In the pas

Re: [rspec-users] autospec fails but rake spec tasks pass (solution)

2009-03-29 Thread David Chelimsky
On Sat, Mar 28, 2009 at 11:05 PM, jakepaul wrote: > > I figured out what the problem was. Turns out that the controller specs used > Mocha's any_instance method to stub valid? and return false (I got this idea > from a Railscast). Due to the order in which autospec runs the specs, > editing the mo

[rspec-users] autospec fails but rake spec tasks pass

2009-03-29 Thread jakepaul
I can't figure out what is causing this problem. I'm using the latest rspec and rspec-rails gems on rails 2.3.2. When I run autospec, the tests in the model spec that I am editing will all fail. The error messages are like this: ActiveRecord::RecordInvalid in 'Job new record should create a new

Re: [rspec-users] RSpec-rails 1.2.2: autospec passes but "rake spec" fails

2009-03-29 Thread Stephen Eley
On Sat, Mar 28, 2009 at 4:49 PM, Bart Zonneveld wrote: > > I very strongly disagree on this one. As it so happens, we've found a bug in > Passenger regarding uploads, umasks and permissions, which was caused by > Passenger overwriting the TMP_DIR environment variable. Took us quite a > while to fi

Re: [rspec-users] Cucumber step definitions vs. RSpec examples

2009-03-29 Thread Pat Maddox
On Sat, Mar 28, 2009 at 1:49 PM, Brandon Olivares wrote: > Hi, > > So, I'm confused. I've been trying to use Cucumber and RSpec, but step > definitions and RSpec examples just seem to be overlapping. What should go > in either one of these? > > For instance, let's say I'm testing if a form exists

Re: [rspec-users] Cucumber step definitions vs. RSpec examples

2009-03-29 Thread Stephen Eley
On Sat, Mar 28, 2009 at 9:49 AM, Brandon Olivares wrote: > > So, I'm confused. I've been trying to use Cucumber and RSpec, but step > definitions and RSpec examples just seem to be overlapping. What should go > in either one of these? This is a subjective judgment call that doesn't have an absolu

[rspec-users] [Cucumber] Stack trace in HTML

2009-03-29 Thread aidy lewis
Hi, Is the stack trace not in the HTML by design? Aidy ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [Cucumber] Stack trace in HTML

2009-03-29 Thread aslak hellesoy
On Sun, Mar 29, 2009 at 10:23 PM, aidy lewis wrote: > Hi, > > Is the stack trace not in the HTML by design? > Tried aslakhellesoy-cucumber 0.2.2.2? Aslak > > Aidy > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mai

Re: [rspec-users] Cucumber step definitions vs. RSpec examples

2009-03-29 Thread Brandon Olivares
> -Original Message- > From: rspec-users-boun...@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of Stephen Eley > Sent: Sunday, March 29, 2009 3:47 PM > To: rspec-users > Subject: Re: [rspec-users] Cucumber step definitions vs. RSpec examples > > This is a subjecti

Re: [rspec-users] spec_server not reloading model classes

2009-03-29 Thread Andrew Vit
It appears this is a bug, with an apparently simple fix in spec_server.rb (rails 2.3 compatibility): https://rspec.lighthouseapp.com/projects/5645/tickets/759 However, now that it's reloading my app, it's not reloading the setup from my fixture/factory gems and throwing up a bunch of errors on re

Re: [rspec-users] Cucumber step definitions vs. RSpec examples

2009-03-29 Thread Zach Dennis
On Sat, Mar 28, 2009 at 9:49 AM, Brandon Olivares wrote: > Hi, > > So, I'm confused. I've been trying to use Cucumber and RSpec, but step > definitions and RSpec examples just seem to be overlapping. What should go > in either one of these? Cucumber is intended to drive out the behaviour of the a

Re: [rspec-users] Cucumber step definitions vs. RSpec examples

2009-03-29 Thread Zach Dennis
On Sun, Mar 29, 2009 at 3:47 PM, Stephen Eley wrote: > On Sat, Mar 28, 2009 at 9:49 AM, Brandon Olivares > wrote: >> >> So, I'm confused. I've been trying to use Cucumber and RSpec, but step >> definitions and RSpec examples just seem to be overlapping. What should go >> in either one of these? >

[rspec-users] what is the context?

2009-03-29 Thread Zhenning Guan
describe MovieList do context "when first created" do it "should be empty" do movie_list = MovieList.new movie_list.should be_empty end end end what is the context work for? -- Posted via http://www.ruby-forum.com/. ___ rspec-us

Re: [rspec-users] what is the context?

2009-03-29 Thread David Chelimsky
On Sun, Mar 29, 2009 at 11:19 PM, Zhenning Guan wrote: > describe MovieList do >  context "when first created" do >    it "should be empty" do >      movie_list = MovieList.new >      movie_list.should be_empty >    end >  end > end > > > what is the context work for? context() is an alias of des