Michael Grosser
203998c916
allow running each test with pure ruby path/to/test.rb
...
also:
- makes test dependencies obvious
- makes tests runnable from within subfolders
2019-12-18 08:49:19 -06:00
Daniel Colson
0d50cae996
Use respond_to test helpers
2018-01-25 23:32:58 -05:00
Koichi ITO
ac717d65a3
[Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment
2017-07-11 13:12:32 +09:00
Kir Shatrov
72950568dd
Use frozen-string-literal in ActiveSupport
2017-07-09 15:08:29 +03:00
Matthew Draper
87b3e226d6
Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
...
This reverts commit 3420a14590
, reversing
changes made to afb66a5a59
.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e
Enforce frozen string in Rubocop
2017-07-01 02:11:03 +03:00
Michael Grosser
a9aed2ac94
improve error message when include assertions fail
...
assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message
assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
2016-09-16 12:03:37 -07:00
Xavier Noria
a731125f12
applies new string literal convention in activesupport/test
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:10:53 +02:00
Akira Matsuda
c2bfe6cbc8
Privatize config_accessor as with attr_accessor
2015-02-06 01:12:07 +09:00
Rafael Mendonça França
04ad814bb9
Make sure multiline string is not accepted by the regexp
2013-12-19 17:28:19 -02:00
Hincu Petru
4cb30d9f8b
Fixed configurable.rb regular expression name check
2013-12-19 17:30:01 +00:00
Zoltan Kiss
c651cc9d50
minor grammar fix
2012-12-24 15:20:05 -06:00
Larry Lv
1efe30ebce
set up config_accessor with a default value by block
...
* ActiveSupport::Configurable should allow config_accessor to take
default value by block, just like cattr_accessor.
class User
include ActiveSupport::Configurable
config_accessor :hair_colors do
[:brown, :black, :blonde, :red]
end
end
User.hair_colors # => [:brown, :black, :blonde, :red]
* remove trailing whitespaces in configurable.rb and its test file.
* Update ActiveSupport CHANGELOG.
2012-09-17 09:14:21 +08:00
Francesco Rodriguez
5e1d40f773
add instance_accessor option to ActiveSupport::Configurable#config_accessor
...
Changes:
* Add `instance_accessor` option to opt out of the instance writer and
instance reader methods.
* Raises a NameError if the name of the attribute is not valid.
* Update documentation and tests.
* Add CHANGELOG entry in activesupport.
2012-06-05 10:50:48 -05:00
José Valim
d677097eb6
Fix configurable cristalization and tests.
2011-06-29 13:57:59 -03:00
José Valim
894bdbd53d
Move variables to underscore format, update protected instance variables list.
2011-05-06 14:57:25 +02:00
Oriol Gual and Josep M. Bach
f42562f97b
Make ActiveSupport::Configurable work with modules
...
[#6486 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-28 13:30:32 -02:00
José Valim
6067d16200
Call it compile_methods! and do the same on AM.
2010-09-27 20:43:56 +02:00
thedarkone
918dc27345
Compile ActionController::Base.config's methods to avoid method_missing overhead.
2010-09-27 17:45:58 +02:00
José Valim
4163ccec23
Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests.
2010-04-22 12:00:13 +02:00