yuuji.yaginuma
32225387c1
use public Module#include instead of send :include
...
Follow up to #18767
2016-11-27 22:20:52 +09: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
a9dc45459a
code gardening: removes redundant selfs
...
A few have been left for aesthetic reasons, but have made a pass
and removed most of them.
Note that if the method `foo` returns an array, `foo << 1`
is a regular push, nothing to do with assignments, so
no self required.
2016-08-08 01:12:38 +02: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
Kristijan Novoselic
f98e75a3e2
Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classes
2015-06-12 17:35:21 +02:00
robertomiranda
ce8efcf296
Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
...
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
2015-01-31 23:12:41 -05:00
Jeremy Kemper
b16c36e688
Introduce Concern#class_methods and Kernel#concern
2014-02-23 12:06:23 -07:00
Damien Mathieu
7aae4e5e66
remove useless duplication in include test
2013-07-22 10:31:14 +02:00
Marat Kazbekov
0ebf45cf5d
remove duplication in test
2013-07-18 20:48:19 +05:00
Mike Dillon
2d7a86e179
Raise when multiple included blocks are defined
2013-05-16 11:28:31 -07:00
Aaron Patterson
b8d8c50785
use AS::TestCase as the base class
2012-01-05 17:12:46 -08:00
José Valim
401393b656
Deprecate InstanceMethods namespace handling in ActiveSupport::Concern.
...
This avoids the unnecessary "yo dawg, I heard you like include, so I put a module that includes your module when it is included" approach when building extensions.
2011-11-21 22:17:35 +00:00
Joshua Peek
669fd84910
AS::Concern redefines "include" to lazy include modules as dependencies
2009-05-29 17:03:23 -05:00
Joshua Peek
c7c35be8fe
AS::Concern includes InstanceMethods module if it exists
2009-05-29 16:28:54 -05:00
Joshua Peek
4e50a35fa2
Break up DependencyModule's dual function of providing a "depend_on" DSL and "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
2009-05-28 11:35:36 -05:00