similar to: Problem Upgrading from 1.0.5 to 1.0.8

Displaying 20 results from an estimated 100 matches similar to: "Problem Upgrading from 1.0.5 to 1.0.8"

2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here
2007 Sep 25
12
Problems with expect_render
Hi there, I''ve been working with RSpec for about a week now, and the process of moving from a Test::Unit + Mocha setup to an RSpec + Mocha environment has been pretty straightforward. Except, I''m having problems with using template.expect_render. I have Mocha enabled with: > config.mock_with :mocha in spec_helper. And then I have a view spec which looks like this:
2007 Dec 05
1
rake error - please help
Hi- I''m suddenly getting this rake error where as before I wasn''t. And nothing''s been changed. As you can see it says something about "load_missing_constant". Is my development environment broken? Can someone please tell me what this error means?: bbgun@echobase:~/RailsProjects/rails_space$ rake test:functionals (in /home/bbgun/RailsProjects/rails_space)
2006 Dec 16
5
trying to add another app
hey all, I have an app working great with apache2 and mongrel_cluster. However, I''m trying to run another application and now when I go to app1.comit falls to app2.com and the opposite. That''s probably because I messed up somewhere with the cluster. this is the content of my conf.d/app1.proxy_cluster.conf: <Proxy balancer://mongrel_cluster> BalancerMember
2007 Nov 14
4
Stubbing out required associated models
Hello, As I''m becoming more and more familiar with mocking/stubbing, I''m going back to some of my model specs and revaluating how I wrote them. I have certain models in which validation requires the presence of an associated model, which itself needs to be valid(validates_presence_of and validates_associated). When I wrote the specs, I wrote helpers for the attributes instead
2007 Nov 13
2
Trouble stubbing a method
Hey guys, I''ll try to explain this without the model code at first, since there is so much, but if need be, I''ll pastie it. I have an Order model that makes API calls to a payment gateway(TrustCommerce) during validation(to verify the credit card information). I''d like to stub this behavior to avoid thousands of calls to TrustCommerce a day(autotest). All the calls
2007 Dec 04
4
AutoTest / Rspec - "stack level too deep"
Hello, I''m running AutoTest with Rspec on a Rails application. Every 20 or so runs I get "stack level too deep" on one particular controller stub. Ex. controller.stub!(:login).and_return(true) This particular line is in a before block of a certain describe block. The strange thing is, every single spec in this file fails on that one line, even the specs in other describe
2008 Jul 25
21
Problems with mock assigned to a constant
Hi all, Initially I thought this was a bug in the built-in mocking framework(and it still may be), but I better hash it out on the mailing list before I file/reopen the ticket: http://rspec.lighthouseapp.com/projects/5645/tickets/478-mocks-on-constants#ticket-478-6 I thought my example illustrated my problem, but obviously I was passing the wrong arguments to the mock. I revised my example to
2008 Jun 04
2
Mock with an attributes that has state
I''m developing a rails application. I have an Order model that has_many OrderItems. I mocked the OrderItem model in my Order specs using mock_model. I thought I should focus my specs on each model and always mock associated models. In my Order model I need a way to merge OrderItems which have the same cost and same product_id. That I can spec. The other thing this merge helper
2007 Sep 14
5
controller.expect_render has me beat!
Hi, A controller has a method with the following def update ... if @config.update_attributes( params[:new_config] ) redirect_to :action => :index else * render :action => :edit, :id => params[:id] # this line here* end ... end The example has the following it ''should render the "edit" config url on an unsuccessful save''
2007 Aug 13
8
How to use expect_render?
Hi: I am a rspec beginner. I have scratched my head for the whole afternoon, trying to figure out a way of writing render expectation in controller spec. However, I failed. It kept telling me that the ''expect_render'' was an undefined method. I have installed rspec 1.0.8 and rspec_on_rails as well. Below is the controller to be tested. Controller def index pre
2008 Jun 03
9
Build rspec-rails as a gem?
I can''t figure out how to build rspec-rails as a gem when just cloned from github... there isn''t any .gemspec file or rake task that does this. Any help? -- Posted via http://www.ruby-forum.com/.
2008 Jan 23
4
expect_render(...).and_return(''x'')
Hi, I''m trying to spec a controller method which renders some rjs as part of a render :update block. The problem I''m having is that stub_render or expect_render don''t seem to allow and_return to work. The controller method does: if @thing.save render :update do |page| page.insert_html :bottom,
2011 Oct 24
9
ActiveRecord::ConnectionNotEstablished
Hello I am rather new to Ruby and have been following along with the book "Ruby On Rails 3 Tutorial - Learn Ruby by Example - by Michael Hartl". I am currently in Chapter 3 which discusses static pages. In this chapter, I entered the following command into the prompt: "rails generate controller Pages home contact" and everything worked fine. Then the book directs me to
2009 May 31
9
No more than one "instances" of a type in define()?
Hi folks, when I try to do something like: define railsproject($name, $uid, $gid, $userpass, $sqlpass) { mysql_database { "$name_staging": ensure => present } mysql_database { "$name_production": ensure => present} ....more stuff... } I get: Puppet::Parser::AST::Resource failed with error ArgumentError: Duplicate definition: Mysql_database[] is already
2010 Nov 20
4
How to get rspec running?
I''m quite new to RoR and recently worked through Michael Hartl''s Rail Tutorial. Now that I had started my first own project and began with the implementation of a first model and it''s controller. The tests I wanted to implement just after that. However, I run into some error messages when I want to start rspec (see below). The Gemfile is the same as in the Tutorial
2009 Jul 29
3
Use of Ruby Gem and Plugin
Hi, I need to know what should we use in ROR application gems or plugins. Which is the best for any ROR application? Can anyone brief me about this. Thanks -- Posted via http://www.ruby-forum.com/.
2006 Mar 19
0
rails analyze issue
hi all: when i debug my site with <a href="http://rails-analyzer.rubyforge.org/">Rails Analyzer</a> #------------------------------------------------------------------------ pl_analyze show me this: pl_analyze /wwwroot/railsprojects/log/production.log /usr/local/lib/ruby/gems/1.8/gems/production_log_analyzer-1.3.0/lib/production_log/analyzer.rb:381:in
2008 Jun 30
0
log4r warning message...
I installed log4r as a gem on Max OS X Leopard. When I start the server locally, I have a warning that I''d like to get rid of. I think this is a side-effect of log4r? Other rails projects that I am working on, on the same machine that don''t generate this warning. this one is the only one using log4r. => Booting Mongrel (use ''script/server webrick'' to force
2010 Aug 17
1
how to get plugins to load
I un-commented the following in my environments.rb file config.plugins = [ :all, :exception_notification, :ssl_requirement] but I get the following errors: in `ensure_all_registered_plugins_are_loaded!'': Could not locate the following plugins: exception_notification and ssl_requirement (LoadError) from /Users/mitch/.gem/ruby/1.8/gems/rails-2.3.2/lib/rails/plugin/loader.rb:44:in