Re: [rspec-users] [rails] url_for host and protocol not set when full spec suite run

2010-09-15 Thread Michael Kintzer
From: David Chelimsky To: rspec-users Sent: Wed, September 15, 2010 8:51:48 PM Subject: Re: [rspec-users] [rails] url_for host and protocol not set when full spec suite run On Sep 15, 2010, at 1:05 PM, Michael Kintzer wrote: rspec (2.0.0.beta.19) >rails (3.0.0) >authlogic (2.1.6) >bartt-ssl_

Re: [rspec-users] variable strange change

2010-09-15 Thread Evgeniy Dolzhenko
Typical Ruby gotcha: God.transaction do puts mad.nil?# mad is instance method of God and returns BelongsToAssociation here if mad.nil? puts 'some thing exctue here' mad = you.mad # Ruby sees mad local variable definition end puts mad.nil?# mad is

Re: [rspec-users] Propagating settings to subtyped ExampleGroups

2010-09-15 Thread David Chelimsky
On Sep 14, 2010, at 11:04 AM, Brian Takita wrote: > On Tue, Sep 14, 2010 at 6:27 AM, David Chelimsky wrote: >> Hey Brian - long time. Hope all is well. More below ... > Hey David, I've been pretty busy, and things are going well. It seems > like things are going well with you :-) >> >> On Sep 1

Re: [rspec-users] [rails] url_for host and protocol not set when full spec suite run

2010-09-15 Thread David Chelimsky
On Sep 15, 2010, at 1:05 PM, Michael Kintzer wrote: > rspec (2.0.0.beta.19) > rails (3.0.0) > authlogic (2.1.6) > bartt-ssl_requirement (1.2.3) > RUBYGEMS VERSION: 1.3.7 > RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.4.0] > > Hi, > > I'm getting different results when running a

[rspec-users] [rails] url_for host and protocol not set when full spec suite run

2010-09-15 Thread Michael Kintzer
rspec (2.0.0.beta.19) rails (3.0.0) authlogic (2.1.6) bartt-ssl_requirement (1.2.3) RUBYGEMS VERSION: 1.3.7 RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.4.0] Hi, I'm getting different results when running a Rails 3 scaffold generated controller example depending on whether or n

Re: [rspec-users] specs inside subfolder of lib folder not displaying proper error messages

2010-09-15 Thread Manish Manchanda
and just to add, this is not a rails app ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] specs inside subfolder of lib folder not displaying proper error messages

2010-09-15 Thread Manish Manchanda
hi im facing this issue in which if i place a failing spec inside a subfolder of my lib folder then along with the error message the file name and the line number is not shown. output as below: 'Test one' FAILED expected: 2, got: 1 (using ==) but if i move the spec directly under lib or any

Re: [rspec-users] Rspec and rails: Problems while testing libraries in the lib directory

2010-09-15 Thread David Chelimsky
On Wed, Sep 15, 2010 at 4:36 AM, nester...@gmail.com wrote: > I have some classes in the lib directory, and I want to test it. My > class which I want to test looks like: > > class StatAggregation >  class << self >    def skills_rate(user_id) >      user_id = User.find_by_id(user_id) >      ... >

Re: [rspec-users] variable strange change

2010-09-15 Thread David Chelimsky
On Wed, Sep 15, 2010 at 3:19 AM, Zhenning Guan wrote: > class User >  has_many :mads > >  def mad >    Mad.find_by_user_id(id) >  end > end > > class God >  belongs_to :mad >  belongs_to :user >  belongs_to :sender, :class_name => "User", :foreign_key => "sender_id" > >  def strange_change! >    G

[rspec-users] Rspec and rails: Problems while testing libraries in the lib directory

2010-09-15 Thread nester...@gmail.com
I have some classes in the lib directory, and I want to test it. My class which I want to test looks like: class StatAggregation class << self def skills_rate(user_id) user_id = User.find_by_id(user_id) ... end end end I created spec: require File.expand_path(File.dirname

[rspec-users] variable strange change

2010-09-15 Thread Zhenning Guan
class User has_many :mads def mad Mad.find_by_user_id(id) end end class God belongs_to :mad belongs_to :user belongs_to :sender, :class_name => "User", :foreign_key => "sender_id" def strange_change! God.transaction do puts mad.nil?#the first time put is false