similar to: help needed in UNIT Testing

Displaying 20 results from an estimated 3000 matches similar to: "help needed in UNIT Testing"

2006 Nov 22
6
My Rails Blog
Hi guys, I have created a new blog for Rails people from chennai. chennairails: http://chennairails.blogspot.com/ please visit my blog. Sorry for making noise. ok bye bye regards, Karthick. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2009 Apr 07
3
assert_valid in unit tests after upgrade to rails 2.3 doesn't work
def test_valid assert_valid State.first end Error: test_valid(StateTest): NoMethodError: undefined method `assert_valid'' for #<StateTest: 0x7f0d60750318> I see that test_valid is now in ActionController::Assertions::ModelAssertions. Does this mean that test_valid is designed to be used i ActionController tests only? I can change my assert_valid(State.first) into assert
2006 Oct 26
8
doubt in Selenium test
Hi guys, I am just started to do selenium test in rails. can u guys plz tell me how to write selenium test for the below code. for ex: i want to use click action in selenium test for the below code <a href="#" onClick="javascript:show_form(''short'');">Add a Short Media Buy</a> advance thx regards, Karthick. -- Posted via
2006 Nov 15
1
how to handle alert box message in selenium test?
hi guys, how to handle alert box message in selenium test? i want to handle alert box. i want to test(verify text present) the text in alert box & then click ok to alert box. how can i do this.? plz tell me... advance thx. regards, karthick. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Jul 24
1
Default in date_select
how to set dafault date in date_select plz explain with example advance thx have a nice day -- Posted via http://www.ruby-forum.com/.
2006 Jul 24
1
Testing w/out DB connection
I have several plain ruby classes that do nothing but implement algorithms. What is the prefferred way to run these w/out making a DB connection every time? Thanks, Dennis Byrne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060724/5ff610dd/attachment.html
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
2006 Jul 11
4
assert fails with <false> is not true
Hi, I have a simple model and written a testcase. class Product < ActiveRecord::Base validates_presense_of :name end ------------- class ProductTest < Test::Unit::TestCase fixtures :products def test_invalid product = Product.new assert !product.valid? end end ------------- The testcase fails with a message, <false> is not true. What is wrong with the testcase? I
2011 Aug 27
4
to represent color range on plot segment
Dear R community, With an advantage of being "NEW" to R, I would like to post a very basic query here, I am in need of representing gene expression data which ranges from -0.09 to +4, on plot "segment". please find below the data df, the expression values are in df[,2]. kindly help me with the code, so that I can represent the values with a clear color gradient (something
2006 Aug 02
2
multi dimensional array
how to implement multi dimensional array in ruby in ruby multi dimension array look like tree structure plz help me & explain with code have a pleasant day thx narayana -- Posted via http://www.ruby-forum.com/.
2006 Aug 05
2
plz do favour in active record
hello I want to do like the below code name=[''net'',''gross'',''amount''] avail= Avail.find(1) return avail.name[0] but it gets error I want to give " avail.name[0] " like this, rather than avail.net directly, can u guys plz help me, how to do this plz explain with code advance thx have a pleasant day narayana --
2006 Aug 04
1
How do i create & insert data into xml file in ruby
hello How do i create new xml file & insert data into that new xml file in ror plz explain with example code.(say i have to insert all the values of a table into xml file ) advance thx Have a pleasant day narayana -- Posted via http://www.ruby-forum.com/.
2012 Jun 01
4
Is there a ftp crawler in ruby on rails?
Hi, I''m a newbie to ROR. I wanted to write some code which can help me to list and then index all the paths on a remote server. Is there a ftp server crawler in ruby? Thanks, Narayana -- Posted via http://www.ruby-forum.com/. -- 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 Jun 24
6
mocking errors
What is the correct way to mock out the errors on a Rails model? I''m assuming i need to say @mock_thing = mock_model(Thing) @mock_thing_errors = mock("errors") @mock_thing_errors.should_receive(:full_messages).and_return("An error") @mock_thing.should_receive(:errors).and_return(@mock_thing_errors) Just wanted to check the best practice on this kind of thing and how
2005 Dec 29
4
Paginate do a Count(*) request before, how access that count value.
Hello, AV::paginate query first by a count, how access this value in the controller or view ? Why ? Because I''ll like to display the total number or records found w/o doing another expenssive Count. Thanks,
2006 May 26
4
Using ''validates_inclusion_of'' to validate foreign key
I seem to be missing something trying to use ''validates_inclusion_of'' to validate a foreign key and was hoping some one could piont out my mistake? The problem seems to be that Order.find_all.collect is not returning an array that contains the order_id, if I replace it with a hardcoded array everything works as expected. The model: class OrderItem < ActiveRecord::Base
2006 Jul 17
2
how to manipulate the OUTLOOK EXPRESS in Ruby
hello how to manipulate the microsoftOUTLOOK EXPRESS in Ruby please explain with code thanx -- Posted via http://www.ruby-forum.com/.
2012 Oct 03
7
How to add a new row in to an existing data set in R Language?
Hi... I have one 2 data set with 3 variables and 4 observations. I want to combine the two data sets. I tried with merge but it gives only the common values. I need common values and and remaining values also. Please help me? this is my data set dataset:1 name va1 va2 AA 10 100 BB 20 200 CC 30 300 DD 40 400 dataset:2 name va1 va2 AA 36 444 BB 10 111 CC 20 222 DD NA 333 Please reply
2009 Aug 01
23
Hi doubt in unit testing
def test_check_for_validity post=County.new(:name=>"myname",:description=>"mydesc") assert post.save end above is the method and when i run unit test it is saying as 1) Failure: test_check_for_validity(CountyTest) [/test/unit/county_test.rb:10]: <false> is not true. what does it say i cannot under stand please help -- Karthik.k Mobile -
2012 May 29
1
gslider-gwidgets
Hello R lovers, For my GUI, I am using gslider of Gwidgets. I need to add the "to=" value dynamically ie., maximum value from a data frame column(something like to=max(df[,3])). But I am getting error message like Error in checkPtrType(object, "GtkWidget") : object of class NULL isn't a GtkWidget Not sure what I am missing here!!! Regards, karthick -- View this