similar to: AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb

Displaying 20 results from an estimated 2000 matches similar to: "AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb"

2007 Aug 30
7
mock_model in spec/lib
Has anyone else run into a problem with trying to use mock_model in spec/lib ? For some reason, I can take the same spec, put it in spec/models, have it run fine, but put it in spec/lib, and have it complain about not being able to find #mock_model Thanks, Edward
2007 Aug 19
4
describing a mock_model as being an instance
Is there a built-in way of describing a mock_model as being an instance, beyond stubbing the eval("Object.methods - Object.new.methods") methods to throw NoMethodErrors? Edward
2007 Aug 01
4
:render expects possible?
Hi, Is it possible to do the following in a controller spec? @controller.should_receive(:render).with(:layout => false) I''ve been trying this kind of thing and it looks like RSpec is messing with the render calls, and requires you to use render_template instead. Could we have at least a warning that mentions that parameters passed to :render expectations are going to be thrown
2009 Feb 02
2
ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))
i keep getting this AssociationTypeMismatch error. i think this could be a bug related to ruby/rails when using mixins. heres a short version of my code: # user.rb require ''friend_invitation'' require ''friendship'' class User < ActiveRecord::Base include FriendInvitationUser, FriendshipUser ... end # friendship.rb ... module FriendshipUser def
2008 Mar 20
1
Combining autotest, rspec, rspec_on_rails and spec-server
Hello, I''ve been trying to google the definitive way to combine autotest, rspec, and spec-server, but to no avail. It seems like there are lots of suggestions from old versions. Furthermore, some commands such as rake:autotest don''t seem to be around anymore. So, is it required to install ZenTest as a gem? I have version 3.9.1. I believe this gets me the autotest
2006 Mar 31
4
How to have a form within a form?
Say I am building a blogging platform, and I want to allow users to be able to add an avatar without leaving the page, when they''re writing a post. I need the avatar information to be included in the form for the post. So for example, after a user adds a new avatar while writing a new blog post, it would be available to be selected as the avatar to be used for that post. What is
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
Basically, I''m trying to crop multiple images out of a remote/original scene.. Think flickr ''tagging'', only, the pixs in the tagged boxes become their own unique images.. by way of simulating an upload from the controller using attachment fu.. can''t quite figure out the specific method in fu that would allow me to do this.. I''m so near the edge right
2011 Aug 09
2
Devise AssociationTypeMismatch
My site is using Devise and Cancan. Currently I have 3 roles setup I am testing creating a new user using the following command (role is required): curl -H "Content-Type:application/json" -H "Accept:application/json" - d "{\"user\":{\"email\":\"test01-J0of1frlU80@public.gmane.org\", \"role\":\"2\", \"name\":
2007 Aug 09
3
AutoTest plugin and rspec for rails
(WinXP) Hi, I have the autotest rails plugin running - detecting changes and running the examples. However the rspec color output (of which I am a fan) ... has stopped happening Anybody got a spare moment to point me in the right direction, please ? Cheers! sinclair -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Aug 07
2
PROBLEM WITH PAPERCLIP
hello, i am trying to upload a image file ...using paperclip in rails 3 i did as follows 1. In gemfile => included gem paperclip 2.In config/environments /development.rb => Paperclip.options[:command_path] = "/usr/bin/" (convert path) 3.created a controller *picusers *and defined => def create @picuser = Picuser.create(params[:picuser]) end 4.created a model *picuser
2007 Jul 22
2
have_tag for href with specific link?
Hi folks, I''m trying out this idea of "outside-in" and writing specs for my views first. Being a person who generally starts with some scribbles of a user interface and moves right to models, this has yet to be fun, but I''m giving it a shot. My question: I''m trying to specify that an index page should show a list of things, each with a link to a delete
2007 Jun 13
3
standard location for spec helpers
Is there a standard location for spec helpers (as in bits of code that help write specs)? I''m mocking/stubing-out portions of ActiveSalesforce, a remote-database abstraction layer so my specs won''t have to rely on a remote connection, but I''m not sure where I should be putting this helper lib. I was thinking of just sticking it in spec/ but I was curious if
2010 Jun 09
4
rails+sinatra sent image
Hi! I have simple rails application - users with name and avatar and in sinatra I want to create new user. form for new user <form action="/users/create" enctype="multipart/form-data" method="post"> <p> <label for="name">Name: </label> <input type="text" id="name" name="user[name]" >
2007 Jun 28
7
Custom report outputting text, expected and actual on succes?
I would like to output the following information when running a spec (_also_ on success): - the description text - the expected value - the actual value After looking through the documentation I thought custom formatters might be the way to go, but unfortunately it does not look like all variables are accessible from there? I need this for an academic report where all testing needs to be
2007 Jul 09
12
Mocking User.find( :all, :limit => 10 )
Hi, I''m trying to setup a mock for my controller test but I can''t get it to recognise the mock. I use it "should find all users" do User.should_receive(:find).with( :all, :limit => 10 ).and_return([@user]) do_get end and in the controller @users = User.find(:all, :limit => 10 ) But this does not work. It gives me User expected :find with (:all)
2005 Apr 04
1
Validation problems: ActiveRecord::AssociationTypeMismatch
Hi everyone, I''m starting on my first rails project and I have a problem that I''m sure has a simple solution. I have two models, an address model and a state model. The address belongs_to :state, foreign_key=>"state" and validate_associated :state I have new & edit controllers for address which contain a drop down list for the state choice. My list was
2007 Mar 28
14
Autotest
Is anyone using rspec with autotest? Scott
2007 Sep 30
4
autotest stop working, 1.0.9?
My autotest runs but when I make changes to a spec it doesn''t reload. I checked another application I was building that had 1.0.9 but it was reloading fine. How would I debug a problem such as autotest not reloading? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070930/6be7160d/attachment.html
2012 Jun 09
7
ActiveRecord::AssociationTypeMismatch in UsersController#update
Hi Im trying to link my User model to a Teams model. I seem to be getting the following errors. Any help would be great as Im just new to RoR Thanks error ActiveRecord::AssociationTypeMismatch in UsersController#update Team(#2183395560) expected, got String(#2174675960) app/controllers/users_controller.rb:67:in `update'' app/controllers/users_controller.rb:66:in `update''
2010 Mar 14
2
autotest & rspec2
Hi guys, I''m trying to find some information on how to get autotest to run the rspec2 tests. I have my project setup so "rake spec" runs the specs properly, but autotest seems to ignore/don''t know that there are specs to test. I read on the rspec2 wiki that autotest integration is o be added eventually. Any ideas on how to achieve this? Thanks, Jeroen