Commit Graph

45539 Commits

Author SHA1 Message Date
Yves Senn
e63ae630e1 build fix, fix error introduced with 091b246bb0111357edbb9703ea342a944b04deb6
Fixes the following issue:

  1) Failure:
ActiveRecord::MySQLPurgeTest#test_establishes_connection_to_test_database [test/cases/tasks/mysql_rake_test.rb:200]:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: ActiveRecord::Base.establish_connection(:test)
satisfied expectations:
- allowed any number of times, invoked once: #<Mock:0x2349430>.recreate_database(any_parameters)
- allowed any number of times, invoked once: ActiveRecord::Base.establish_connection(any_parameters)
- allowed any number of times, invoked once: ActiveRecord::Base.connection(any_parameters)
2014-07-24 17:00:14 +02:00
Yves Senn
091b246bb0 fix, mysql db:purge respects Rails.env.
Previously this method always established a connection to the test database.
This resulted in buggy behavior when combined with other tasks like
`bin/rake db:schema:load`.

This was one of the reasons why #15394 (22e9a91189af2c4e6217a888e77f22a23d3247d1)
was reverted:

> I’ve replicated it on a new app by the following commands: 1) rails
  generate model post:title, 2) rake db:migrate, 3) rake
  db:schema:load, 4) rails runner ‘puts Post.first’. The last command
  goes boom. Problem is that rake db:schema:load wipes the database,
  and then doesn’t actually restore it. This is all on MySQL. There’s
  no problem with SQLite.

  -- DHH

22e9a91189 (commitcomment-6834245)
2014-07-24 16:42:34 +02:00
Yves Senn
a208fb7647 clenaup, unify CHANGELOG format. [ci skip] 2014-07-24 14:53:19 +02:00
Matthew Draper
fa78378f76 Merge pull request #16280 from a3gis/master
Fixes #16265 and correct documentation typo
2014-07-24 22:08:16 +09:30
a3gis
c0932162d2 Fix documentation typo in ConnectionSpecification::Resolve.spec 2014-07-24 14:23:36 +01:00
a3gis
98d2421ef9 Fixes #16265 2014-07-24 14:21:55 +01:00
Yves Senn
2a67e12fdb pg, change_column_default, :table, :column, nil issues DROP DEFAULT.
Closes #16261.

[Matthew Draper, Yves Senn]

Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`.
However, PostgreSQL will cast the default to the columns type,
which leaves us with a default like "default NULL::character varying".

/cc @matthewd
2014-07-24 14:27:41 +02:00
Matthew Draper
f3478f8413 Merge pull request #16276 from y-yagi/bug_report_templates
[ci skip]Add i18n master to the Gemfile
2014-07-24 20:36:34 +09:30
yuuji.yaginuma
ea88b8e8c3 [ci skip]Add i18n master to the Gemfile 2014-07-24 17:08:11 +09:00
Matthew Draper
7e20b9449a Merge pull request #16260 from akshay-vishnoi/doc-change
Calling require_self twice in css raises Sprockets::ArgumentError exception [ci skip]
2014-07-24 17:30:22 +09:30
Akshay Vishnoi
2e679ac262 Calling require_self twice in css raises Sprockets::ArgumentError exception [ci skip] 2014-07-24 11:39:41 +05:30
Rafael Mendonça França
b17330cf39 Remove mocha usage 2014-07-23 19:01:44 -03:00
Rafael Mendonça França
23cb26cfac Fix syntax error 2014-07-23 18:30:27 -03:00
Rafael Mendonça França
ecef1776a0 Dev and edge application and plugins need to include i18n master 2014-07-23 18:05:57 -03:00
Rafael Mendonça França
bec08e7744 Merge pull request #16267 from robin850/rbx-yaml
Set Psych as the YAML engine for Rubinius
2014-07-23 17:45:15 -03:00
Rafael Mendonça França
cd7d414e48 Do not set enforce_available_locales to i18n 0.7
Now the default is always true.

Users still can set it using config.i18n.enforce_available_locales.
2014-07-23 17:40:44 -03:00
Robin Dupret
558f8aa2ee Set Psych as the YAML engine for Rubinius
Since the rubysl-yaml gem doesn't ship with Psych by default because of
its dependency on libyaml, on Rubinius, the default engine is Syck.

However, if we want to be able to run the application safely on
different rubies, we need to make people using Rubinius rely on Psych.

See http://git.io/uuLVag for further information.
2014-07-23 20:05:14 +02:00
Rafael Mendonça França
af216b7431 Split Action Pack tests in a new job on travis
This will make easier to compare run time between Ruby 2.1 and trunk
2014-07-23 14:58:59 -03:00
Rafael Mendonça França
decb83b9fd Use PROCESS_COUNT to define the number of parallel executors 2014-07-23 14:40:43 -03:00
Aaron Patterson
0b773c30fb specify N=0 to prevent parallel tests (just run tests on the main process) 2014-07-23 10:38:52 -07:00
Arthur Nogueira Neves
8c48a70824 Merge pull request #16237 from tonytonyjan/patch
`create` method returns an active record object with errors instead of false when validation fails. [skip ci]
2014-07-23 13:02:12 -04:00
Tony Jian
d0af905925 create return an active record object with erros instead of false when validation fails. [skip ci] 2014-07-23 16:31:55 +08:00
Yves Senn
74a157ac5f Merge pull request #16234 from tgxworld/fix_template_assertion_for_integration_test
Fix AC::TemplateAssertions instance variables not resetting.
2014-07-22 22:19:17 +02:00
Rafael Mendonça França
1db00698da Merge pull request #16256 from akshay-vishnoi/doc-change
Fixes #16255 [ci skip]
2014-07-22 11:27:31 -03:00
Akshay Vishnoi
28b3180f49 Fixes #16255 [ci skip] 2014-07-22 19:19:32 +05:30
Yves Senn
aa3740ebd2 Merge pull request #16231 from Envek/type_in_references
* Allow to specify a type for foreign key column in migrations
* unified the docs
* some cleanup in CHANGELOG
2014-07-22 15:04:29 +02:00
Andrey Novikov
6d327dbc0c Allow to specify a type for foreign key column in migrations
[Andrey Novikov & Łukasz Sarnacki]
2014-07-22 15:21:11 +04:00
Yves Senn
bb3b2d0b09 Merge pull request #16253 from zuhao/refactor_activerecord_nested_through_associations_test
Make sure assertion passes for postgresql.
2014-07-22 11:55:47 +02:00
Yves Senn
16fe198315 Merge pull request #16254 from zuhao/refactor_activerecord_attribute_decorators_test
Remove redundant reset that already happened in teardown.
2014-07-22 11:33:53 +02:00
Zuhao Wan
4dfe213d0f Remove redundant that already happened in teardown. 2014-07-22 17:24:31 +08:00
Zuhao Wan
c40bfc80b7 Make sure assertion passes for postgresql. 2014-07-22 17:03:26 +08:00
Yves Senn
4c81c8ce53 build fix, remove not null constraint.
The fixtures are still in play, adding a new column without a default and `null: true`
is not possible. This reverts back to leaking global state, as our `schema.rb` adds
the `null: false` constraint on this field.

A future solution would be to make the `migration_test.rb` run independent of fixture tables.
This way we can simply drop the state after test execution, without worrying about side effects.

/cc @zuhao
2014-07-22 09:07:31 +02:00
Yves Senn
30a38181f8 Merge pull request #16250 from zuhao/refactor_activerecord_migration_test
Remove length limit that results failure in other tests.
2014-07-22 08:45:51 +02:00
Zuhao Wan
8e30a63625 Remove length limit that results failure in other tests. 2014-07-22 14:43:59 +08:00
Yves Senn
ce14ebe6b4 docs, add example for running a single test against core adapters.
[ci skip]
2014-07-22 08:41:25 +02:00
Yves Senn
fc7a849ce5 Merge pull request #16248 from zuhao/refactor_activerecord_presence_validation_test
Remove the side-effects of validates_presence_of.
2014-07-22 08:32:05 +02:00
Zuhao Wan
18cc7123ab Remove the side-effects of validates_presence_of. 2014-07-22 10:09:05 +08:00
Rafael Mendonça França
cee2c85b07 Merge pull request #16232 from egilburg/activesupport_coverage
Added some missing activesupport test coverage
2014-07-21 14:25:51 -03:00
Rafael Mendonça França
fae918575f Merge pull request #16239 from akshay-vishnoi/remove-require
Remove not-required file class/subclasses
2014-07-21 13:12:55 -03:00
Arthur Nogueira Neves
2cb862a35b Merge pull request #16242 from vadivelan-k/content_verifier
Touch option description grammatical error fixed [ci skip]
2014-07-21 11:41:12 -04:00
vadivelan
3b0430f3da Touch option description grammatical error fixed [ci skip] 2014-07-21 20:55:53 +05:30
Eileen M. Uchitelle
93930686fd Merge pull request #16240 from siddharthbhagwan/master
Generators guide grammatical error fixed [ci skip]
2014-07-21 08:19:58 -04:00
Siddharth Bhagwan
7021e66588 Generator guide grammatical error fixed [ci skip] 2014-07-21 17:39:20 +05:30
Akshay Vishnoi
4b2eb17bb2 Remove not-required file class/subclasses 2014-07-21 15:46:53 +05:30
Yves Senn
b84918057b Merge pull request #16236 from y-yagi/patch-1
[ci skip] Fix code in Routing Guide
2014-07-21 09:16:52 +02:00
yuuji.yaginuma
7464d00dd7 [ci skip] Fix code in Routing Guide 2014-07-21 11:27:20 +09:00
Guo Xiang Tan
d14f646997 Fix AC::TemplateAssertions instance variables not resetting.
Fixes https://github.com/rails/rails/issues/16119.
2014-07-21 08:47:26 +08:00
Eugene Gilburg
3b9cc0a56f missing activesupport test coverage 2014-07-19 17:15:40 -07:00
Rafael Mendonça França
08754f12e6 Merge branch 'rm-remove-mocha'
Conflicts:
	actionpack/test/abstract_unit.rb
2014-07-19 18:17:13 -03:00
Rafael Mendonça França
fd6aaaa0c3 Stop requiring mocha automatically
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.

This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.

Added FIXME notes to place that still need mocha removal
2014-07-19 17:35:12 -03:00