Displaying 20 results from an estimated 4000 matches similar to: "assert_no_difference question"
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
2009 Apr 30
1
error with test:functionals
Hello there,
I working on my tests but I getting this strange errror:
I can see on the database that the object was created but I still got
an failure on my test.
this is my test code:
test "should create artist" do
assert_difference(''Artist.count'', difference = 1) do
post :create, :artist => { }
end
assert_redirected_to
2007 May 08
3
assert_difference eval magic in [6693]
I just saw Marcel''s change to assert_difference that changes the
method API to take a string param that is evaled in a lambda.
http://dev.rubyonrails.org/changeset/6693
I much preferred the old API, since it''s simple enough to pass a
lambda. Passing a string means the lambda is in the wrong scope and
doesn''t have access to objects in the test case scope.
For an
2008 Jan 08
0
PwrGSD
Hello List:
Please find uploaded to CRAN a new package, PwrGSD
The package is intended for the design and analysis of group sequential trials
There are two main functions,
(1) GrpSeqBnds: computes group sequential stopping boundaries for interim
analysis of a sequential trial based upon a normally distributed test
statistic. This can be done via the Lan-Demets procedure with
2008 Jan 08
0
PwrGSD
Hello List:
Please find uploaded to CRAN a new package, PwrGSD
The package is intended for the design and analysis of group sequential trials
There are two main functions,
(1) GrpSeqBnds: computes group sequential stopping boundaries for interim
analysis of a sequential trial based upon a normally distributed test
statistic. This can be done via the Lan-Demets procedure with
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
2005 Apr 21
0
Viral activitiy coming from an IP in your network.
Hi, my name is Grant Taylor. I am a subscriber to the LARTC mail list lartc@mailman.ds9a.nl. The LARTC mail lists has been plagued with viral email coming from changing IPs in your one of your subnets. Based on the fact that the WhoIs information below says that the subnet in question is a dial up pool this would explain the changing IPs. In less than 6 days the list has received 14 viral
2009 Jan 26
1
ups emerson liebert GTX2 ESP-II serial protocol demo
2009/1/22 Spiros Ioannou <sivann at gmail.com>
> Cher Arnaud,
>
Hi Spiros,
> I send you a demo that reads info from an Emerson Liebert
> GXT2-10000T230 through the RS-232 port. This uses the "ESP-II (ESP 2)
> Protocol".
> Current supported data includes: measurements (voltage, temperature,
> etc) , ID strings (serial number, etc), status flags (inverter on,
2013 Sep 19
0
Performance problem generating URL for thousands of images, due to hitting HDD for each one
Hi,
I have a model where I''m using Carrierwave to let users upload their
avatars. I have one version for the avatar, cropped to a square called
"cropped".
class User
mount_uploader :avatar, AvatarUploader
end
class AvatarUploader < ImageUploader
version :cropped do
process :crop
end
end
In one of my pages, where I''m listing a few thousand users,
2006 Aug 06
2
assert_difference gives undefined method error in unit tests
Hi there
Am hitting undefined method errors for ''assert_difference'' in my unit
tests under Rails 1.1.4
What could I be missing?
Richard Sandilands
2007 Oct 17
1
Problem with assert_difference
Hello Friends,
I have problem with assert_difference, I want its syntax and
explantion in detail, Please help me, plz give me solution.
Regards,
Kiran Polawar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2007 Dec 06
0
saving the user id for thumbnails using attachment_fu
I am using attachment_fu to create thumbnails, and it is working
great. However, I am have a view with all my users thumbnails
displayed and am trying to make it so when you click on a thumbnail of
their avatar, it shows that users profile. In order to accomplish
this I have saved a user_id identifier for each avatar, but the
problem is that attachment_fu only saves this user_id for the main
2007 May 06
1
validates_uniqueness_of (with :scope) doesn't seem to work?
I have a master record called ''project'' and a child record called
''agycode''. Obviously, agycode has a project_id FK. I wish to make the
"descr" field unique ONLY within the ''project_id'' ''scope''. Here are the key
pieces of information
Agycode fields (id, project_id, descr)
Here''s the declaration in the
2012 May 22
0
functional tests assert_difference with array
given a new partner instance and a new admin instance are created,
what should be the difference number : +1 or +2
the doc is not so clear on it....
assert_difference [ ''Partner.count'', ''Admin.count'' ], +1 do...
thanks for feedback
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to
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
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]" >
2006 Dec 04
5
should_be_different -- possible implementation
There is an assert_difference helper for Test::Unit (you can read
about it at http://blog.caboo.se/articles/2006/06/13/a-better-
assert_difference and to some it should look familiar -- you know who
you are :), so I took a shot at one for rSpec on Rails.
class Object
def should_be_different(method = nil, difference = nil)
return self.should_not_eql(yield) if method.nil?
2006 Jun 09
0
partials and rjs
I must have a misunderstanding of partials, maybe one of you can help me
out. I have a page that initially displayed via the following:
<-- in controller -->
def find_areas_for_country
@country_areas = CountryArea.find(:all, :conditions => ["country_id
= :country", params], :order => "descr asc")
render :partial => ''country_area''
2007 Aug 14
2
AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
Before I chalk this up as a bug and report it, I just want to make sure I''m not
doing something silly.
Running ZenTest''s autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the
following failed test:
ActiveRecord::AssociationTypeMismatch in ''User should create an avatar with
uploaded_data''
Avatar expected, got Avatar
This only happens with that exact
2009 Jan 07
0
how rails insert object id to database?
[4;35;1mUser Create (0.5ms) [0m [0mINSERT INTO `users` (`name`,
`avatar_file_name`, `avatar_file_size`, `created_at`, `updated_at`,
`avatar_content_type`) VALUES(''hello'', ''Screenshot.png'', 253800,
''2009-01-08 08:27:19'', ''2009-01-08 08:27:19'', ''image/png'') [0m
[paperclip] Saving attachments.
[paperclip]