On Tue, Nov 10, 2009 at 4:10 PM, DEfusion wrote:
> Removing the :sub domain conditions from the namespace does fix the
> issue, and moving the sub domain conditions to the individual route
> definitions causes them all to fail.
>
> On Nov 10, 11:59 pm, DEfusion wrote:
> > Okay I've managed to re
Removing the :sub domain conditions from the namespace does fix the
issue, and moving the sub domain conditions to the individual route
definitions causes them all to fail.
On Nov 10, 11:59 pm, DEfusion wrote:
> Okay I've managed to re-create my original problem by trying to use
> params_from to
Okay I've managed to re-create my original problem by trying to use
params_from to verify the routing (which was another area I was
experiencing problems with before).
Note each one of the routes I'm defining here all return fine in the
browser, they hit the appropriate controller and run the show
Now that is weird. I tried to make an isolated example for you and
that worked fine. So I put un-commented my spec bit by bit and it
works fine.
I'm sure I've had this problem before. If I do re-create it I'll post
more details here.
=D
On Nov 10, 10:48 pm, David Chelimsky wrote:
> On Tue, Nov
On Tue, Nov 10, 2009 at 2:25 PM, DEfusion wrote:
> I'm getting really cheesed off with RSpec not matching some of my
> routes when controller testing when I have subdomain checking
> (courtesy of subdomain-fu) on namespaces. These routes appear in the
> rake routes output, and work fine via HTTP
I'm getting really cheesed off with RSpec not matching some of my
routes when controller testing when I have subdomain checking
(courtesy of subdomain-fu) on namespaces. These routes appear in the
rake routes output, and work fine via HTTP requests .
The really annoying thing is it's working fine
Using RSpec 1.2.9 and Rails 2.3.4.
RSpec is not matching some of my routes during controller testing when
I have subdomain checking (courtesy of subdomain-fu) on namespaces.
These routes appear in the rake routes output, and work fine via HTTP
requests .
The really annoying thing is it's working
I just started my ImportsController and was this was really the way to
go:
import.rb/
class Import < ActiveRecord::Base
has_attached_file :csv
validates_attachment_presence :csv
after_save :process_csv
private
def process_csv
FasterCSV.foreach( csv.path) do
On Tue, Nov 10, 2009 at 4:44 AM, Amit Kulkarni wrote:
> Hi all,
> I am writing scenarios for testing my routes but it is giving me error
> as undefined method `route_for and also for params_from.
> Did i miss something which i need to add in my controller
>
> My code is as follows:
>
> require Fi
On 10 Nov 2009, at 14:08, Saverio Miroddi wrote:
> Is there a clean/simple way of stubbing the activerecord find() for a
> single instance?
MyModel.stub(:find).with(42).and_return(myModel)
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rub
Is there a clean/simple way of stubbing the activerecord find() for a
single instance?
As usual pattern, I see something like
myModel = MyModel.new(...)
MyModel.stub( :find ).and_return( myModel )
which can give problems in case we want to find other instances.
???
Saverio
--
Posted via http:/
Hi all,
I am writing scenarios for testing my routes but it is giving me error
as undefined method `route_for and also for params_from.
Did i miss something which i need to add in my controller
My code is as follows:
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe H
I checked the whole code but there is no error as such.
What i have done is i added a line i.e.
t.spec_opts = ['--format' , 'html:result.html' ] under
/lib/tasks/rspec.rake i.e.
[:models, :controllers, :views, :helpers, :lib, :integration].each do
|sub|
desc "Run the code examples in spec/#{s
Alexander Seidl wrote:
> Alexander Seidl wrote:
>> http://gist.github.com/230814
>
> I should give some keywords here:
> I set an expectation in the test that a redirect_to should take place if
> a certain condition is made: @login_user.categories.size <= 0.
> But the test fails and says: "expect
Alexander Seidl wrote:
> http://gist.github.com/230814
I should give some keywords here:
I set an expectation in the test that a redirect_to should take place if
a certain condition is made: @login_user.categories.size <= 0.
But the test fails and says: "expected redirect to {:action=>"index"},
http://gist.github.com/230814
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
16 matches
Mail list logo