similar to: Rails 1.2.1 reload of active record changed?

Displaying 20 results from an estimated 30000 matches similar to: "Rails 1.2.1 reload of active record changed?"

2007 Jan 30
2
save does not cascade in 1.2.1?
Hi All, I have the following test case which worked just fine before I upgraded to rails 1.2.1: def test_update_settings assert @unit.setting!=nil # loaded via fixtures assert_equal @unit.setting,@current_setting # also loaded via fixtures @unit.setting.mode = true assert @unit.save @unit.reload assert @unit.setting.mode end where @unit is declared with
2006 Jan 10
1
Can somebody explain when to reload an ActiveRecord
Hi all, I''ve the following test method in my controller_test which increment the ''qty'' attribute in a has_many association, ''sa_report_products''. The ''item_count'' method returns the sum of all qty''s in ''sa_report_products'': def test_add_product_to_report sa_rpt = SaReport.find(1) assert_equal 3,
2009 Oct 12
1
Reload data inside a test?
Hi, I something like: def test_something @object = Object.create(...) @object.update_attribute(...) assert_equal "changed", @object.attribute end The problem is that in the assertion, @object still holds the old values. Isn''t there a reload! method to reload the @object values? -- Posted via http://www.ruby-forum.com/.
2009 Sep 01
13
Function Testing Reloading Fixtures before assertion
Hey Everyone, I have a function test the is failing (despite the fact the function actually works in the application). I was looking for some debug advice on how to find my problem. Here is the test: def test_should_delete_word assert_equal ''published'', words(:one).status debugger delete :destroy, :id => words(:one).to_param assert_equal
2006 May 05
7
Testing model: test becomes dependent on previous test
Im having trouble with Testing models. im following the tutorials in the book Agile Web Development with Rails. if i execute the code product_test.rb, i get this error: ============================================================ 1) Failure: test_update2(ProductTest) [test/unit/product_test.rb:30]: <29.95> expected but was <99.95>. 3 tests, 11 assertions, 1 failures, 0 errors
2006 Jul 06
0
problema con i test automatizzati
ciao a tutti.     come al solito, sto andando avanti a piccoli passi nel creare l''applicazione depot del libro "Sviluppare Applicazioni Web con Rails". Ora mi trovo nella fase di creazione dei test automatizzati. Ma c''è una cosa che proprio non capisco: Ho la seguente classe in ~/depot/test/unit/product_test.rb require File.dirname(__FILE__) +
2006 Apr 13
0
Globalize not with Rails 1.1.2
Does anybody have the latest Globalize (r184) working with Rails 1.1.2? I can''t seem to get a very simple example to work: ----- ruby test/unit/news_item_test.rb Loaded suite test/unit/news_item_test Started F. Finished in 0.10109 seconds. 1) Failure: test_add_content_translations(NewsItemTest) [test/unit/news_item_test.rb:49]: <"US Title"> expected but was
2006 Mar 20
2
Testing Models And Fixtures
I have finally decided to look into testing and I am going through the examples in the AWDWR book and I tried the following and it does not work... even though I don''t see why it shouldn''t. =========== posts.yml =========== basic_post: id: 1 title: Title body: Body created_at: 2006-02-01 00:00:00 updated_at: 2006_02-02 00:00:00
2007 Jan 24
7
Ferret problems with Rails 1.2.1
Hi, I''ve just updated rails from 1.1.6 to 1.2.1 and I''m getting the following errors whenever I load a page that uses a class that uses ferret. I have ferret 0.10.13 and acts_as_ferret. They were working fine before the upgrade. #<NameError: cannot remove Object::WildcardQuery>
2007 Jan 20
2
Rails 1.2.1 console not working
I''m running Rails 1.2.1, Ubuntu Server 6.10 and my console isn''t running... same project checked out via SVN runs in console on my Windows machine. error: brian@rails-server:~/work/mediabump$ ruby script/console Loading development environment. /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/console.rb:25:in `exec'': No such file or directory - irb -r
2006 May 19
3
new to rails; problem with testing section in Agile book
Hello, I should give the expected disclaimer that I am brand new to rails and am going through the Agile web development with Rails book right now. I am in the testing section and I can''t get past an error. this is my cart_test.rb test file: require File.dirname(__FILE__) + ''/../test_helper'' class CartTest < Test::Unit::TestCase fixtures :products def setup
2006 Apr 21
2
destory Test Case Messes up all tests
I am trying to create unit tests for my users model but when I add a test that destroys a user, that user is not available in any of the other test. If I remove the test that destroys the user all my other tests work again. All the fixtures are suppose be reloaded between tests right? Here is my testcase : require File.dirname(__FILE__) + ''/../test_helper'' class UserTest
2007 Jan 30
3
Interesting Framework Speed Test Results. Shows Rails 1.2.1 trailing 1.1.6.
I found this little post over at the Slicehost forums (http:// forums.slicehost.com): http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading- frameworks/ Speed test between Rails (1.1.6 and 1.2.1), Django (w/wo psyco and threaded/pre-forked), TurboGears, Symfony, Catalyst etc. Nginx as the front-end for all of them. Even though they are simulated numbers I thought it might be
2007 Feb 20
2
rails 1.2.1, locomotive and backgroundrb
Hi I just tried to move my project to rails 1.2.1 on my locomotive development setup. It seems that backgroundrb is not willing to start up anymore. If I switch locomotive back to 1.1.6, everthing is fine. This is the error I get while attempting to start backgroundrb: /Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/
2006 Feb 22
3
Unit test failure - nil object?
I''m following instructions in the Agile book, page 146 for testing an object update to the database. Here''s my code: def test_update assert_equal "jack@smiths.com", @user.email @user.email = "jack@smiths.org" assert @user.save, @user.errors.full_messages.join("; ") @user.reload assert_equal @user.email,
2006 May 04
2
Testing associations
I have a pretty simple model, articles and users. class Article belongs_to :user end class User has_many :articles end In my unit tests I want to ensure that the associations work properly. What''s the best way to do this? The obvious thing to do is a test in each model. # user_test.rb def test_add_post u = users(:first) before_articles = u.articles.count u.articles
2019 Jan 17
1
[hivex PATCH] ruby: improve test functions
Use better functions to check for proper values instead of assert: - refute_nil for non-null functions - assert_equal for checking equality Also, make sure that the parameters for assert_equal are correct: expected value, then got value. --- ruby/tests/tc_120_rlenvalue.rb | 4 ++-- ruby/tests/tc_130_special.rb | 12 ++++++------ ruby/tests/tc_200_write.rb | 4 ++--
2006 Jun 04
0
[SUMMARY] Rails Core Weekly May 29 - June 4
Rails Core Weekly May 29 - June 4 Dear List, Another week has passed, here''s RCW, the McCartney Edition: This weeks kicks of with Josh Susser fixing has_and_belongs_to_many #create method to properly populate joins with new records :http://www.ruby-forum.com/topic/67478#new. Check out his test: def test_create_by_new_record devel = Developer.new(:name => "Marcel",
2006 May 15
0
acts_as_list, move_higher, odd indexing behaviour?
Hi, [reposting to list, posting via google groups apparently didn''t work] I''m trying to use acts_as_list for the first time. Can anyone confirm the odd behaviour reported here? http://blog.nominet.org.uk/tech/Web/2006/03/06/Using_acts_as_list_in_... i.e. element access and move_higher require an odd indexing scheme to work. I''m personally finding that I
2011 Jun 07
3
reload chan_dahdi.conf without disconnect active calls
Hi ALL, Is there any way i can reload chan_dahdi.conf without disconnecting active PRI calls ? I want to change pridialplan= option -S -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110607/005a1193/attachment.htm>