similar to: Routing errors with Rails 3.0.1 and Rspec 2.0.1

Displaying 20 results from an estimated 1000 matches similar to: "Routing errors with Rails 3.0.1 and Rspec 2.0.1"

2010 Jun 20
7
rspec-rails 2.0.0.beta.12 showing undefined method error for route_to
First of all, I''ve been trying to find an answer for this problem all over the internet without luck. The thing is that I am using RVM with ruby 1.9.2-head and I created a new empty gemset. Then I installed bundler gem with: gem bundler install That installed the library into the /Users/damselem/.rvm/gems/ ruby-1.9.2-head at rails3/gems directory. Then I went to my rails 3 app
2008 Jun 09
10
Testing file attachment with Paperclip
Does someone have an example on faking a file upload for just ensuring it gets called, without actually uploading the file to s3. I thought that stubbing Model.has_attached_file would be enough, but it doesn''t seem so ... This is what I did: Video.stub!( :has_attached_file ).with( :name ).and_return( true ) has_attached_file is from paperclip, it gets mixed to the model. 1)
2004 Aug 06
2
mountpoint
can anybody explain to me the mountpoint that is mentioned by icecast version 1.3.12? I see that the mountpoint is /default what does this mean and how can I change it in the icecast.conf file. I am running this on a freebsd 4.7 STABLE release. - Noah <p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from
2006 Mar 08
7
Function could determine the caller action ?
Is it possible to determine which action call the function ? In example, func_test in ApplicationController could determine which action from SiteController is calling her ? in class ApplicationController I have def func_test if ( calling from index ) return "1" end if ( calling from contact ) return "2" end end and in class SiteController def
2006 Aug 17
4
Unit Tests and lib/
Hi *, I have a few modules in lib/ and I use them mostly in my models. I''d like to add a few unit tests and run them with rake with all other tests of my app: where do I have to write them ? TIA, ngw -- Nicholas Wieland nicholas_wieland@yahoo.it -------------- next part -------------- An HTML attachment was scrubbed... URL:
2014 Jun 09
0
How can I test my controller via rspec for something other than response.should be_success?
1) Right now this is just testing a successful response. However, since I've gone and created a Post via FactoryGirl... how can I test the @post.id equals one of the id's being returned by the get: index json? describe Api::V1::PostsController do context 'Post' do before(:each) do @post = FactoryGirl.create(:post) end context '#index' do
2007 Jan 06
3
speeding up pagination
I need help to optimize a query (sort of ...) if params[:debit] == "on" @schools = School.find(:all, :conditions => ["name like ?", "%#{params[:search]}%"], :order => ''name'') @schools.delete_if { |s| s.debit <= 0 } @school_pages = Paginator.new self, @schools.length, 20 The problem here is that
2011 Mar 07
3
.rvmrc file not working?
hello, i am trying to install gemsets but my .rvmrc file not working so i have create gem sets with the command rvm gemset create rails3 but when i am using rvm info its not showing the gemsets in the environment.. this is the content of .rvmrc file rvm 1.9.2@rails3 --create..help me guys.. thanks nishant -- You received this message because you are subscribed to the Google Groups "Ruby
2006 Mar 07
2
Determine which action, which controller is calling ?
Hello, Is it possible to determine wich :action , wich :controller is calling the function func_test in ApplicationController ? in class ApplicationController I have def func_test if ( calling from index ) return "1" end if ( calling from contact ) return "2" end end and in class SiteController def index @var = func_test end def
2009 Nov 10
10
Un-recognised routes that do exist, using namespaces & subdomain checking
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 for routes that aren''t at the root of the namespace. E.g. say I have
2013 May 18
3
You have already activated rake 10.0.4, but your Gemfile requires rake 10.0.3.
I''m careful to create separate gemsets for each project, so when I run bundle install, it only installs gems for that gemset. This way gems dont creep into the wrong projects. Now I just pulled a project from github. I made sure I was in the correct gemset, and then I run bundle install and it works fine. but then when I use rake to create the database "rake db:create". I get
2006 Jul 21
3
ActionMailer doesn''t send any mail
I''ve configured actionmailer following the documentation, adding to environment.rb everything for using my mail account on yahoo using deliver_* methods to send a mail. I can see the mail in development.log and everything seems fine, but no mails so far. Is there a place where can I see what the server answered, or something to look at to solve the problem ? I have no clue,
2007 Nov 10
2
be_success misleading
Just wondering if anyone else thinks that ''response.should be_success'' is potentially misleading. If you''re writing a spec for an action that is failing in some way it can still have a status 200. So while the HTTP request was technically successful, something in the action was not. Perhaps something like ''response.should have_success_status''? Steve
2006 Jul 31
5
ActionWebService API
Hi *, I need to pass a hash to a webservice, so I defined my API with: api_method :search, :expects => [{ :tags => :string, :assignment => :string, :resource => :string, :lesson_plan => :string, :subject => :string, :all_types => :string }], :returns => [[Resource]] when I try to test the webservice with scaffold the
2005 Mar 24
3
Caching computation in rails?
Caching computation in rails? Simple example: factorial modulus a large number input: integer x output: factorial( x ) % 12345678901234567 I want it so that if it computes factorial of N once, it will not have to compute for N again. code: class SiteController < ApplicationController caches_action :factorial, :inv def examine @inv = @params[''inv''] @outv =
2012 Jan 20
3
Istalling Ruby 1.9.2
I just installed 1.9.2 on my 2nd machine, but after I installed I checked the version with ruby -v and it sent me 1.8.7 Here''s the terminal output...anyone know what''s wrong (I have RVM installed): Francescas-MacBook-Air:~ fkrihely$ rvm install 1.9.2 Fetching yaml-0.1.4.tar.gz to /Users/fkrihely/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/fkrihely/.rvm/src Configuring
2007 Nov 01
2
Writing controller specs
One thing that is bothering me about my controller specs is that sometimes I end up with a number of examples that are the same except for the example name. The reason that this happens is that I''ve expressed all the expected behavior with should_receive. While this does more or less work as intended it doesn''t feel right. As an example, let''s say I''m writing
2012 Feb 18
0
Rails NameError : uninitialized constant RelationshipsController
I am trying to run a test of my app buy my relationships_controller_spec.rb file won''t run. Here''s the error I get: Exception encountered: #<NameError: uninitialized constant RelationshipsController> Here''s the code for my relationships_controller_spec.rb file: require ''spec_helper'' describe RelationshipsController do describe "access
2009 Aug 11
13
I've decided to use Rails... (I hope I made the right decision).
I''ve read a ton of comparisons that compare one framework to another, and one language to another. There''s so much conflicting advice out there that it''s hard to know what is best. Did I make the right choice choosing Rails for my first web project? I guess we''ll see. The only reason why I''m hesitant is that a lot of the big name sites use php
2009 Oct 06
3
rspec-rails 1.2.9 Released
rspec-rails version 1.2.9 has been released! * <http://rspec.info> * <http://rubyforge.org/projects/rspec> * <http://github.com/dchelimsky/rspec-rails> * <http://wiki.github.com/dchelimsky/rspec/rails> * <rspec-devel at rubyforge.org> Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.9 / 2009-10-05 * enhancements * added route_to and