[rspec-users] Do you remember RSpactor?
It took me a while to get the next release out, but I finally managed to release RSpactor 0.9.16, a Mac OS X RSpec runner. There are no new features but RSpactor should be a lot more stable and responsive now. If you want to have a look and download: http://rubyphunk.com/articles/2008/08/04/now-on-stock-rspactor-0-9-16/. bye -- Andreas Wolff DynamicDudes Lightweight Ruby on Rails application development http://dynamicdudes.com hire: +49 151 58 54 78 50 home: http://rubyphunk.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Can't access actions of a singular nested resource
Bastien, What version of Rails and rspec are you using? Using a singular resource like you presented works just fine for me, Zach On Thu, Jul 31, 2008 at 10:06 AM, Bastien [EMAIL PROTECTED] wrote: I can't figure out what I do wrong there, I have a nested controller which is defined as a singular resource, the routing works properly, but inside my specs the request never goes through the show action. I keep on getting this error : Spec::Mocks::MockExpectationError in 'Surveys::ReportController should return the survey corresponding to the report' Mock 'Class' expected :find with (any args) once, but received it 0 times In my specs : require File.expand_path(File.dirname(__FILE__) + '/../../ spec_helper') describe Surveys::ReportController do it should return the survey corresponding to the report do Survey.should_receive(:find) get :show, :survey_id=34 end end In route.rb : map.resources :surveys do |survey| survey.resource :report, :controller ='surveys/report' end In controller/surveys/report_controller.rb : class Surveys::ReportController ApplicationController def show @survey = Survey.find(params[:survey_id]) respond_to do |format| format.html format.xml end end end ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Rspec doesn't pickup the status code correctly.
On Aug 4, 5:16 am, Steve [EMAIL PROTECTED] wrote: J2M wrote: I'm setting the status code on a controller action but rspec doesn't seem to be catching it in my spec. It works in the browser. This is the controller method, called via xhr with header Accept: 'application/json' def validate account = Account.new(:login = params[:login]) account.valid? unless (errors = account.errors['login']) url = ['http:','', request.host, params[:login]].join('/') respond_to do |format| format.json { render :json = { :url = url } } end else url = ['http:','', request.host].join('/') respond_to do |format| format.json { render :json = {:errors = errors, :url = url }, :status = 409} end end end I don't know if it's the cause, but your unless statement is an assignment, and not an equality comparison: unless (errors = account.errors['login']) That's just me being lazy I'm assigning errors I could have put that as; errors = account.errors['login'] if account.errors['login'] But it isn't the cause as it works in the wild, it is just the spec that fails. Thanks, James ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
[rspec-users] Keep getting respond_to? errors
Every time I save a model spec I get this: super: no superclass method `respond_to?' And I have to restart autotest to get it to go away. Is there any solution to this? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Keep getting respond_to? errors
On Aug 4, 2008, at 5:55 PM, Fischer, Daniel wrote: Every time I save a model spec I get this: super: no superclass method `respond_to?' Are you running under drb? Autotest? What version of rspec? rails? I'm almost certain this is a rails loading bug...Are you requiring anywhere? What is the value of config.cache_classes in your test.rb? Scott ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Capistrano: after_deploy system specs?
On Sun, Jul 27, 2008 at 2:52 PM, john [EMAIL PROTECTED] wrote: Hi everyone, I was curious if anyone out there had any examples or advice for running specs on system status. I would like to analyze unix utilities such as ps -aux|grep dispatch, uptime, top (ruby processes), proper log activity, etc. Write now I frantically scramble through these on the command to make sure everything's okay and a rollback isn't in order. So far I've only found one writing about the subject: http://www.vaporbase.com/postings/Running_rspec_after_you_deploy This artcle (very cool) has his post deploy rspec results outputted to the server in question as HTML, so a few minutes after the deploy he just visits the web page. Thanks in advance Hey John - this is something I've never really though of doing myself. This email was a few days ago - have you been experimenting? What have you come up with? Cheers, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Autotest quits when code has errors
On Mon, Jul 28, 2008 at 5:10 PM, Evan Dorn [EMAIL PROTECTED] wrote: Sorry, I'd put this in a ZenTest forum (as opposed to RSpec), except that I can't find one. I find it frustrating that autotest keeps running when it finds failing tests - but it quits back to the command line whenever a test or code contains *errors*. What do you mean it quits back to the command line? This means I have to constantly (like every 5 minutes) restart autotest by hand, which kind of defeats the purpose of autotest, and I find it hard to believe this is the default behavior. If I want to do TDD/BDD and call methods before they exist, this causes autotest to quit, which REALLY defeats the purpose. That would suck, but I haven't had this experience. Am I doing something wrong, or is there a fix? I'm using ZenTest 3.10 with RSpec 1.1.5. There has not been a 1.1.5 release, so I'm guessing you're using code from github, right? Can you provide a bit more about what you're doing? Are you using Rails? If so, which version? If not, how are you organizing things? Are you using a gem that you built? Cheers, David Thanks! -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users