Commit Graph

38918 Commits

Author SHA1 Message Date
Rafael Mendonça França
96a80bf394 Merge pull request #11641 from ankit8898/test_cleanup
Cleanup of class_name
2013-07-28 07:49:46 -07:00
Rafael Mendonça França
dfd5e772c4 Merge pull request #11634 from neerajdotname/fix_order_dependent_test_for_migration
fix order dependent test related to migration
2013-07-28 07:45:42 -07:00
Rafael Mendonça França
4a76054165 Merge pull request #11635 from neerajdotname/make_test_order_independent_by_resetting_timezone
make test order independent by resetting timezone
2013-07-28 07:45:12 -07:00
Rafael Mendonça França
c8461e0d43 Merge pull request #11637 from neerajdotname/make_test_not_depend_on_order
reset default timezone and make test order independent
2013-07-28 07:44:56 -07:00
Rafael Mendonça França
f625d325e0 Merge pull request #11638 from neerajdotname/make_order_independent_association_test
make test not depend on order
2013-07-28 07:44:33 -07:00
Vijay Dev
2a71e9cbd4 Merge branch 'master' of github.com:rails/docrails 2013-07-28 19:41:48 +05:30
Mikhail Dieterle
f14c94dd1a Typo fix 2013-07-28 17:01:29 +03:00
Ankit Gupta
408b798240 Cleanup of class_name
Don't think class name is needed as by default belongs_to :select will be linked to Select class.
2013-07-28 15:00:55 +01:00
Mikhail Dieterle
b1b589cab6 Using markdown-style code quotes 2013-07-28 16:36:26 +03:00
Neeraj Singh
4cf4ea506d make test not depend on order
`NestedThroughAssociationsTest` adds records to `member_details` table.
When test performs `@member_details[0]` then the order of record
is not guaranteed. Hence it is best to start with a clean slate by
deleting unwanted records.
2013-07-28 16:51:55 +05:30
Neeraj Singh
5e68e42f62 reset default timezone and make test order independent 2013-07-28 16:08:01 +05:30
Robin Dupret
741fdbfcf4 Fix lixml2 to libxml2 [ci skip] 2013-07-28 12:19:54 +02:00
Neeraj Singh
d52052d027 make test order independent by resetting timezone 2013-07-28 14:58:19 +05:30
Guillermo Iguaran
b6c0639825 Merge pull request #11633 from neerajdotname/fix_rder_dependent_test
fix order dependent test
2013-07-28 01:44:54 -07:00
Neeraj Singh
10259c3e90 fix order dependent test related to migration
If the order in which tests are executed is changed then test fails.
This commit ensures that all migrations are run before ensuring that
there are no pending migration.
2013-07-28 14:14:24 +05:30
Neeraj Singh
09beb9c292 fix order dependent test
`ReflectionTest` uses column information in tests and those tests break
if tests are run in random order.
2013-07-28 11:46:02 +05:30
Rafael Mendonça França
6b7424c230 Merge pull request #11625 from phstc/minor-refactor-code-gardener-grouping
Minor refactor - Uses Enumerable#to_a instead of iterate and add to an array
2013-07-27 15:29:46 -07:00
Pablo Cantero
7ed8934f08 Minor refactor - Uses Enumerable#to_a instead of iterate and add to an
array
2013-07-27 19:25:01 -03:00
Santiago Pastorino
bffda1e65e Merge pull request #11620 from spajus/update_docs
Update Rails 3.2.x guide link [ci skip]
2013-07-27 08:17:04 -07:00
Tomas Varaneckas
33f902ee55 Update Rails 3.2.x guide link [ci skip] 2013-07-27 09:26:05 +03:00
Jay Hayes
a99aa3ba1b Fixes typo in Object#try! 2013-07-26 15:18:04 -05:00
Robin Dupret
82a2a78be8 Use hyphenated version of assert_url [ci skip] 2013-07-26 16:10:03 +02:00
Robin Dupret
a8d1412a32 Add a SQL example for not [ci skip]
To share a certain logic across other examples, let's add a sample SQL
code generated by the given Ruby code
2013-07-26 15:11:58 +02:00
Xavier Noria
7d7c9f4d6b Merge pull request #11611 from arunagw/api-generation-av
Excluding action_view/vendor in API[ci skip]
2013-07-26 04:02:09 -07:00
Damien Mathieu
3f29a65cd5 Refix my misreading of the diff
sorry @robin850.
Thanks @fxn
2013-07-26 12:23:33 +02:00
Arun Agrawal
1e384f82b0 Removed excluding vendor from API doc [ci skip]
These folder not exists in system
2013-07-26 12:21:53 +02:00
Damien Mathieu
8b8d7f9721 Revert "Fix the SQLite gem name"
This reverts commit 700c6c65bcce17d4c61423ceaef031bcbe203337.

Bot the `sqlite3` and `sqlite3-ruby` gems exist.
https://rubygems.org/gems/sqlite3
https://rubygems.org/gems/sqlite3-ruby

In fact, they both point to the same github repository.
https://github.com/luislavena/sqlite3-ruby

However, the last one hasn't been released since 2011, while the first
one keeps getting regular releases.
2013-07-26 12:05:42 +02:00
Arun Agrawal
e32576ae52 Excluding action_view/vendor in API [ci skip] 2013-07-26 12:03:53 +02:00
Max Shytikov
310fc2b8c1 Refactor handling of action normalization
Reference:
Bloody mess internals
http://gusiev.com/slides/rails_contribution/static/#40
2013-07-26 09:49:07 +01:00
Akira Matsuda
633be2cbbd Be sure to restore the default I18n.locale after changed its value in a test 2013-07-26 04:21:52 +09:00
Akira Matsuda
c48cbb02d7 Fix order dependent tests
Restore default ActiveSupport::XmlMini.backend after tests
2013-07-26 04:17:00 +09:00
Akira Matsuda
64202abc3d Don't mutate the Base settings by merge!ing the given value 2013-07-26 04:04:51 +09:00
Akira Matsuda
fb97a7d87b Reset ActionView::Base.logger instead of AC::Base.logger
see: 9b0ac0bc74569db460f87ea6888b3847be0ff5be
2013-07-26 03:01:27 +09:00
Akira Matsuda
d9f1542fd3 Fix order dependent tests
Reset ActionView::Base.logger after tests
2013-07-26 03:01:26 +09:00
Akira Matsuda
24869e38af Fix order dependent AP test
any_instance.stubs + unstub with Mocha doesn't restore the original status in the following case,
so we need to undef Customer#to_json before every test

require 'test/unit'
require 'mocha/setup'

module M
  def foo() :foo; end
end

class C
  include M

  undef_method :foo
end

C.any_instance.stubs(:foo).returns(:mocha)

C.any_instance.unstub(:foo)
2013-07-26 03:01:26 +09:00
Aaron Patterson
d7fc97d3f9 grab executable from rubygems 2013-07-25 10:01:19 -07:00
Rafael Mendonça França
af29af674e Merge pull request #11598 from Karunakar/flat_map1
Used flat_map instead of map.flatten in mas_many_through_associations_test.rb
2013-07-25 09:37:51 -07:00
Karunakar (Ruby)
8998441967 used flat_map instead of map.flatten 2013-07-25 21:58:26 +05:30
Steve Klabnik
ca3074c434 Merge pull request #11582 from steveklabnik/add_bin
rake -> bin/rake
2013-07-25 08:32:42 -07:00
Rafael Mendonça França
cd4feb31ce Merge pull request #11341 from arunagw/added-missing-actionview-to-install
Added description in actionview gemspec.
2013-07-25 07:12:11 -07:00
Carlos Antonio da Silva
7a44832899 ✂️ [ci skip] 2013-07-25 08:49:00 -03:00
Carlos Antonio da Silva
156da53eaa Merge pull request #11591 from ankit8898/typo
Typo fix [ci skip]
2013-07-25 04:46:25 -07:00
Carlos Antonio da Silva
0b06e901c8 Merge pull request #11593 from rajcybage/fix_test_models
change function def self.table_name to self.table_name
2013-07-25 04:44:26 -07:00
Rajarshi Das
5a2a703fe8 change function def self.table_name to self.table_name
change def self.primary_key to self.primary_key

change def self.primary_key to self.primary_key
2013-07-25 17:13:08 +05:30
Ankit Gupta
c213bf174f Typo fix
[skip ci] Fixing the typo which is formed a not required link.  Check here http://api.rubyonrails.org/classes/ActionController/Base.html  under paramters section
keeping it under tt tag
2013-07-25 11:57:27 +01:00
Akira Matsuda
4dd47fb9d5 More unused associations in AR test models 2013-07-25 18:52:31 +09:00
Akira Matsuda
962d2d2737 Clean up unused associations in AR test model 2013-07-25 17:29:09 +09:00
Akira Matsuda
44f785357c Use Ruby 2.0 caller_locations instead of caller if available
* we no more have to manipulate the each caller strings by ourselves using caller_locations

* caller_locations runs slightly faster, and creates less objects than good old caller
Benchmark (loading an Engine 1000 times):
  caller: 262.89 ms
  caller_locations: 186.068 ms
2013-07-25 17:13:53 +09:00
Akira Matsuda
3c6f35dc03 Privatize non-test method 2013-07-25 17:08:43 +09:00
Andrew White
4db0637d55 Allow overriding of all headers from passed environment hash
Allow REMOTE_ADDR, HTTP_HOST and HTTP_USER_AGENT to be overridden from
the environment passed into `ActionDispatch::TestRequest.new`.

Fixes #11590
2013-07-25 07:54:57 +01:00