[rspec-users] Notes on upgrading from RSpec 1 to RSpec 2

2010-12-04 Thread Jim Morris
I am trying to upgrade a Rails 2.2.2 app to Rails3, its a pain ;) Part of this is I need to upgrade all my Specs to RSpec2, as this info does not seem to be in any one place, here is a summary of what I needed to do... * needed to rename all my views from .haml to .html.haml, (or .html.erb) alth

Re: [rspec-users] Speccing a model class method in Rails produces nil

2010-12-04 Thread Martin Hawkins
I can't believe I did that either... Doh! On Dec 4, 4:04 pm, David Chelimsky wrote: > On Sat, Dec 4, 2010 at 8:34 AM, Martin Hawkins > wrote: > > I can't believe I did that... > > No, there is only one Factory; copy and paste error. The SeasonDate > > class is: > > class SeasonDate < ActiveReco

Re: [rspec-users] controller_name replacement?

2010-12-04 Thread David Chelimsky
On Sat, Dec 4, 2010 at 5:07 AM, Jim Morris wrote: > This his been discussed but the only definitive answer (kinda) was > use... > >  describe "a description" do >   system { SomeController } subject {SomeController.new} HTH, David > >  end > > However when I do that I get this error... > > @con

Re: [rspec-users] Speccing a model class method in Rails produces nil

2010-12-04 Thread David Chelimsky
On Sat, Dec 4, 2010 at 8:34 AM, Martin Hawkins wrote: > I can't believe I did that... > No, there is only one Factory; copy and paste error. The SeasonDate > class is: > class SeasonDate < ActiveRecord::Base >  def self.find_start_record >    where(["date_type = ?", "start_date"]).first I think t

Re: [rspec-users] Speccing a model class method in Rails produces nil

2010-12-04 Thread Martin Hawkins
Apologies if this is a repeat post but google seemed to ignore my last effort. There is only one Factory - copy, paste and editing error. I can't believe that I didn't include the code being tested... class SeasonDate < ActiveRecord::Base def self.find_start_record where(["date_type = ?", "s

Re: [rspec-users] Speccing a model class method in Rails produces nil

2010-12-04 Thread Martin Hawkins
I can't believe I did that... No, there is only one Factory; copy and paste error. The SeasonDate class is: class SeasonDate < ActiveRecord::Base def self.find_start_record where(["date_type = ?", "start_date"]).first end end Agreed regarding the redundant test - I just put that in when thi

Re: [rspec-users] [Sinatra] "tried to create Proc object without a block"

2010-12-04 Thread Ernst Arnold
Next step, testing the client: rspec spec/client_spec.rb /home/ernsta/.rvm/gems/ruby-1.9.2-p0/gems/typhoeus-0.2.0/lib/typhoeus/multi.rb:21: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] [Sinatra] "tried to create Proc object without a block"

2010-12-04 Thread Ernst Arnold
Oops it connects. That was my firewall blocking 3000, sorry. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] controller_name replacement?

2010-12-04 Thread Jim Morris
This his been discussed but the only definitive answer (kinda) was use... describe "a description" do system { SomeController } end However when I do that I get this error... @controller is nil: make sure you set it in your test's setup method. I used to use controller_name :somecontroll