- 26 9月, 2016 10 次提交
-
-
由 Kasper Timm Hansen 提交于
-
由 Kasper Timm Hansen 提交于
Wash out your old! These adhoc scripts are replaced by the new commands.
-
由 Kasper Timm Hansen 提交于
Prescribed some review fixes for myself!
-
由 Kasper Timm Hansen 提交于
Still vulnerable to different file structures. We likely want something more robust when we tackle in app commands.
-
由 Kasper Timm Hansen 提交于
-
由 Kasper Timm Hansen 提交于
-
由 Kasper Timm Hansen 提交于
Makes sure we get support for `Minitest.after_run` hooks and don't accidentally run tests twice. Requires overriding minitest `run` to respect the TESTOPTS variable.
-
由 Kasper Timm Hansen 提交于
-
由 Kasper Timm Hansen 提交于
The Rails test runner supports three ways to run tests: directly, via rake, or ruby. When Running with Ruby ala `ruby -Itest test/models/post_test.rb` our test file would be evaluated first, requiring `test_helper` and then `active_support/testing/autorun` that would then require the test file (which it hadn't been before) thus reevaluating it. This caused exceptions if using Active Support's declarative syntax. Fix this by shifting around when we set the how we're run to closer mimick the require order. If we're running with `bin/rails test` the test command file is run first and we then set `run_with_rails_extension`, later we hit `active_support/testing/autorun` and do nothing — because we've been run elsewhere. If we at this point haven't set `run_with_rails_extension` we've been running with `ruby` this whole time and thus we set that. We should always trigger `Minitest.autorun` as it doesn't hurt to call it twice. Consolidate the two methods into a single one that better brings out the intent of why they're there.
-
由 Kasper Timm Hansen 提交于
Revise the require in the test command to use `active_support/testing/autorun` and spare us the minitest spec syntax as detailed in 5da4d514. Also move the require to the top of the file for consistency with the rest of Rails' requires across the project.
-
- 25 9月, 2016 4 次提交
-
-
由 प्रथमेश Sonpatki 提交于
Fix code formatting in `#save` RDoc [ci skip]
-
由 Adam Crownoble 提交于
Noticed that the `validate: false` option for `ActiveRecord::Persistence#save` and `#save!` were not formatted as code like the other examples in the documentation.
-
由 Jon Moss 提交于
AS => Active Support [ci skip]
-
由 Santosh Wadghule 提交于
-
- 24 9月, 2016 14 次提交
-
-
由 Andrew White 提交于
Fix ActiveSupport::TimeWithZone#in
-
由 Thomas Balthazar 提交于
Previously calls to `in` were being sent to the non-DST aware method `Time#since` via `method_missing`. It is now aliased to the DST aware `ActiveSupport::TimeWithZone#+` which handles transitions across DST boundaries, e.g: Time.zone = "US/Eastern" t = Time.zone.local(2016,11,6,1) # => Sun, 06 Nov 2016 01:00:00 EDT -05:00 t.in(1.hour) # => Sun, 06 Nov 2016 01:00:00 EST -05:00
-
由 Arthur Nogueira Neves 提交于
support minitest after_run
-
由 Michael Grosser 提交于
-
由 Matthew Draper 提交于
Only search fixture_path for files that can't be found directly
-
由 Matthew Draper 提交于
When passed an already-valid file name, prepending the path is likely to create problems. This is particularly relevant for #26384, which adds fixture_path handling to test classes that previously didn't have it: any existing caller must have been manually locating the file, and we don't want to break them.
-
由 Claudio B 提交于
Add #25546 and #25817 to changelog [ci skip]
-
由 प्रथमेश Sonpatki 提交于
Fix docs for allowed params to `get` in controller tests [ci skip]
-
由 Michael Hoy 提交于
Fixes #26602 Relevant method documentation: https://github.com/rails/rails/blob/abe3da9f12710ea85be69b17172bef41220037fc/actionpack/lib/action_dispatch/testing/integration.rb#L14-L43
-
由 Aaron Patterson 提交于
Serialize JSON attribute value nil as SQL NULL, not JSON 'null'
-
由 Trung Duc Tran 提交于
Test: JSON attribute value nil can be used in where(attr: nil) Add changelog entry
-
由 Aaron Patterson 提交于
Prevent circular require of proxy_wrappers.rb, Fixes #26430
-
由 Philip Nguyen 提交于
-
由 Aaron Patterson 提交于
Return true if attribute is not changed for update_attribute
-
- 23 9月, 2016 4 次提交
-
-
由 Prathamesh Sonpatki 提交于
- If the attribute is not changed, then update_attribute does not run SQL query, this effectively means that no change was made to the attribute. - This change was made in https://github.com/rails/rails/commit/0fcd4cf5 to avoid a SQL call. - But the change resulted into `nil` being returned when there was no change in the attribute value. - This commit corrects the behavior to return true if there is no change in attribute value. This is same as previous behavior of Rails 4.2 plus benefit of no additional SQL call. - Fixes #26593.
-
由 Vipul A M 提交于
fix formatting of `define_callbacks` doc [ci skip]
-
由 yuuji.yaginuma 提交于
Single backticks don't work with rdoc.
-
由 Arthur Nogueira Neves 提交于
Fix memoization bug on ActionDispatch::TestRequest#request_method=
-
- 22 9月, 2016 2 次提交
-
-
由 Kir Shatrov 提交于
TestRequest have been overrriding request_method setter since 2009, but the actual implementation in Request (not TestRequest) has been changed since that. Now it's also using @request_method instance variable to keep the state. The override in TestRequest have not been calling `super`, which caused a bug that after accessing #requst_method the value was memoized and then we've never been able to change it anymore: ``` req = ActionDispatch::TestRequest.create puts "was: #{req.request_method}" # memoized here req.request_method = "POST" puts "became: #{req.request_method}" ``` output: ``` was: GET became: GET ``` Since the whole purpose of overriding the setter in TestRequest is to upcase it, I'm changing it to `super(method.to_s.upcase)`
-
由 Richard Schneeman 提交于
add check of argument
-
- 21 9月, 2016 4 次提交
-
-
由 Wolfgang Teuber 提交于
-
由 Jon Moss 提交于
[ci skip] Replace to closing tag
-
由 Andrey Molchanov 提交于
-
由 Vijay Dev 提交于
-
- 20 9月, 2016 2 次提交
-
-
由 Andrew White 提交于
Restore missing Gemfile.lock entries
-
由 Ryuta Kamizono 提交于
These lines were lost in https://github.com/rails/rails/commit/12d5c210#diff-e79a60dc6b85309ae70a6ea8261eaf95L191.
-