Displaying 20 results from an estimated 200 matches similar to: "map.resources :foo_items, :as => :foo confusing my controller specs"
2008 Jun 12
0
disregard my map.resources :foo_items, :as => :foo question
disregard my map.resources :foo_items, :as => :foo question
I was pulling some rookie moves.
Thanks
Mike
--
Mike Mondragon
Work> http://sas.quat.ch/
Blog> http://blog.mondragon.cc/
2007 Oct 10
1
Scraping AOL Webmail to login and fetch contacts?
I''m helping with a gem that is going to published under the
contentfree project on rubyforge
(http://rubyforge.org/projects/contentfree/).
The gem is called "blackbook" and basically it will go and fetch your
contacts from the major webmail providers. So far Gmail, Yahoo!, and
MSN have been completed.
We are trying to finish up with fetching contacts from AOL Webmail.
However
2019 Oct 25
2
Duda de como plantear
Estimado Elisabete Juaristi Arrieta
Al leer su correo pensé que usted quería resolver un problema para lo que R
no es adecuado, luego pensé que usted deseaba solucionar un problema donde
hay datos y una ecuación a resolver. En este segundo caso yo muchas veces
me pregunto cuál sería la forma para algunos problemas que tengo, muchos de
estos tienen solución pero pienso que esa solución es puesta
2019 Oct 25
2
Duda de como plantear
Gracias Emiliano, pero no me vale. No conozco los valores de a,b y c. Tengo
que plantear tres condiciones y luego a través de la resolución de un
sistema lineal que me encuentre los valores de a,b, c.
Puede que no lo tenga que hacer a través de function y haya algún otro
modo.
Gracias de nuevo!
El vie., 25 oct. 2019 7:14, Emilio L. Cano <emilopezcano en gmail.com>
escribió:
> Hola
2007 Jul 26
2
rspec_resource error
First of all hi, I''m new to the list, and rather new to rspec as will
probably show in myquestion.
I have tried installing rspec and rspec_on_rails as plugs both using
"script/install" and
"piston import" commands using the "current release install instructions"
here [1]. However,
there doesn''t seem to be any mention of the rspec_resource
2008 Oct 09
1
About received unexpected message :code with (no args)
I use rspec_scaffold to generate a part of examples as below:
it "should expose a newly created awarding_body as @awarding_body" do
AwardingBody.should_receive(:new).with({''these'' =>
''params''}).and_return(mock_awarding_body(:save => true))
post :create, :awarding_body => {:these => ''params''}
2007 Nov 12
3
Weird error downloading a gzip''ed file
Hi all,
I''ve been using mechanize for a while and it rocks. Docs are pretty clear
and so far I''ve been able to do it on my own.
However, I''m stuck in a weird situation in a script to download my contact
list from hotmail.
I''ve used Firebug to check all urls, and tested it by hand while logged in
via browser.
Even in the script everything works well until the
2007 Aug 16
17
undefined method `mock_model'' for [RSpec example]:#<Class:0x25550a8>
I am getting:
undefined method `mock_model'' for [RSpec example]:#<Class:0x25550a8>
with my view specs after upgrading to 1.0.8. Is anyone else seeing this?
To isolate the message I did the following setup:
- create new rails project (with edge)
- installed rspec and rspec_on_rails
- ran rake spec
- ran script/generate rspec_scaffold products
- tried to run a builtin view
2009 Jun 13
2
removing Mocha; 'spec spec' fails but the specific model file passes
I happened to mix ryan bates'' authentication scaffold with
rspec_scaffold on a demo project.
and ran into the problem of mixing mock frameworks...ryan uses mocha.
So, as a learning experience, I choose to redo ryan''s tests without
mocha but ran into a strange problem with tests of the User model.
With debugging you can see....
If you run just the user_spec.rb file, everything
2008 Dec 17
1
My first rspec reports "undefined method `key?' for #<String:0x46b1df0>"
this my first rspec test, it is very simple
-----------------------------------------------------------------------------------------------------------------------------------------
>
require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'')
describe Doc do
fixtures :docs
before(:each) do
@doc=docs(:yjn_bjy)
end
it "should create a new instance
2008 Jan 23
2
integrate_views is not executing my views
I wanted to use "integrate_views" as Ryan explains in his RailsCast #71
(http://railscasts.com/episodes/71)
...but I can''t get it to work: the view code in not executed
I looked everywhere but I can''t understand what I am doing wrong.
Here is what I did:
I created a new application from scratch (Rails 2.0.2), added rspec and
rspec_on_rails plugins, and run
2008 Jul 05
5
Does RSpec work nicely with UUID primary keys?
I have my application happily generating UUID primary keys using the
uuidtools gem.
But the auto-generated specifications created by "script/generate
rspec_scaffold...", etc, assume that one is using a sequential integer
primary key.
For those who have hit this same issue, is it just a matter of rewriting
the auto-generated specifications to take this into account, or does one
have to
2009 Jan 16
3
rspec model testing - test on user defined validation- How do I test that the create failed.
I''m new to rspec and looking for way to test a validation I added to a model.
The test checks to see that if field1 has a value then field2 must be nil
and vice versa.
-------------------------------
When I did the rspec_scaffold it generated one test which worked
before :each do
@valid_attributes = {
:field1 = "value for field1"
:field2 = "value for
2008 Sep 12
1
restful_authentication rspec failures "Mysql::Error: Incorrect datetime value:"
I am getting 193 failures that all have "Mysql::Error: Incorrect
datetime value:"
how do i fix this??? i am new to rspec and restful_auth, so if i am
doing something wrong, let me know!!!
windows xp
rails 2.1.1
rails testproject
cd testproject
# create my databases and edit database.yml
git init
git submodule add git://github.com/dchelimsky/rspec.git vendor/plugins/
rspec
git
2007 Dec 18
2
rpec_scaffold and nested resources
I''ve got a love-hate relationship with script/generate rspec_scaffold
If you are using non-nested controllers/resources it''s great. I love
the spec skeletons it generates.
But I find myself doing this, where Y is and existing set of
model/controller ... representing a resource:
1) script/generate rspec_scaffold x ....
At this point rake spec passes.
2) edit config/routes.rb
2007 Nov 02
5
RSpec, RESTful nested routes and :path_prefix
Dear list,
In the app we are making we have a rout something like this:
map.resources :projects do |projects|
projects.resources :pages, :controller
=>"Wiki::Pages", :path_prefix => "/projects/:project_id/
wiki", :name_prefix => "project_wiki_"
end
But I can''t get RSpec(I''m very new to it) to accept this. It keeps
throwing errors:
2007 Dec 16
3
how do I spec my Rails routes?
Once again, here''s something I haven''t figured out. Apologies if this
is too newb-ish, but, how do I spec my routes using RSpec-Rails?
In particular, I''ve got a catch-all route that needs to catch a wide
variety of URLs:
map.document ''*url'', :controller => ''documents'', :action => ''show''
Is there a way to
2019 Oct 24
2
Duda de como plantear
Buenas noches,
Tengo una función del tipo f(x)=a*x^2+b*x+c y sé que esta función pasa por
el punto (1,3). Quisiera que R me sustituyera la x por 1, y me sacara la
expresión que quedase para luego ese resultado igualarlo a 3, es decir, que
hiciera lo siguiente, sustituyera x=1 en f(x), y me devolviera lo siguiente:
a*1^2+b*1+c
He probado a meter f de distintas formas:
f<-function(x)
2008 Jan 26
0
RSpec and resource_controller plugin
I just discovered James Golick''s resource_controller plugin
http://jamesgolick.com/resource_controller after spending another
stretch of boredom making the changes to nest yet another rails
resource controller. I''d actually slowed down this time to think
about what I was doing in hopes of automating the task.
I''ve tended to use script/generate rspec_scaffold to get
2007 Nov 09
26
RSpec on Rails 2.0
I have a project on edge rails that I''m trying to convert from Test:Unit
to rspec. I have the rspec gem version 2338, the rspec and
rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in
vendor/rails.
I''ve been able to get a few specs passing, have gotten the specs running
from autotest, and am able to do "rake spec:doc" and get the basic
command