Kir Shatrov
dfcc766163
Use frozen string literal in actionpack/
2017-07-29 14:02:40 +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
Akira Matsuda
bc87e2123d
String#end_with? should be faster than Regexp here
2017-01-05 01:37:36 +09:00
Xavier Noria
628e51ff10
applies new string literal convention in actionpack/lib
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:51:43 +02:00
yui-knk
36005af64a
Use sufficient a regexp anchor to check @response.content_type.to_s
...
This commit follows up of ea9bc06c9a
.
To check `@response.content_type.to_s` is ended with `"xml"`,
to use `\z` is sufficient.
2015-10-22 20:33:32 +09:00
Sean Griffin
ea9bc06c9a
Merge pull request #20715 from simsalabim/feature/parse-rss-atom-as-xml
...
parse RSS/ATOM responses as XML, not HTML
2015-10-20 16:11:36 -06:00
Jeremy Daer
565094a8b5
Use Mime[:foo]
instead of Mime::Type[:FOO]
for back compat
...
Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
that support multiple Rails versions would've had to feature-detect
whether to use `Mime::Type[:FOO]` or `Mime::FOO`.
`Mime[:foo]` has been around for ages to look up registered MIME types
by symbol / extension, though, so libraries and plugins can safely
switch to that without breaking backward- or forward-compatibility.
Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
by type or extension, so it's not available as `Mime[:all]`. We use it
internally as a wildcard for `respond_to` negotiation. If you use this
internal constant, continue to reference it with `Mime::ALL`.
Ref. efc6dd550e
2015-10-06 11:29:30 -07:00
Aaron Patterson
e4ba720c17
stop calling deprecated methods
...
We should be asking the mime type method for the mime objects rather
than via const lookup
2015-09-21 12:04:12 -07:00
Boris Peterbarg
4be3997c9f
Compare content_type with Mime::XML instead of regexp
...
Regexp is broken for both content types including charsets and for
integration tests, where the content_type is a Mime::Type and not String
2015-03-16 06:35:00 +02:00
Rafael Mendonça França
1b9e85dbbd
Make sure assert_select can assert body tag
...
This reverts commit f93df52845
, reversing
changes made to a455e3f4e9
.
Conflicts:
actionpack/lib/action_controller/test_case.rb
actionview/lib/action_view/test_case.rb
2014-11-18 18:47:22 -02:00
Kasper Timm Hansen
f939904f23
Parse HTML as document fragment.
...
This is to match the changes in Rails Dom Testing rails/rails-dom-testing#20 .
2014-09-29 21:41:52 +02:00
Rafael Mendonça França
158a6dfcd2
We don't need loofah for the assertions
...
We can just use nokogiri
2014-07-15 13:40:21 -03:00
Timm
9efdffe437
Moved html_document to ActionDispatch::Assertions. Included the Rails::Dom::Testing::Assertions there as well.
2014-06-16 21:04:20 +02:00
Timm
95c517b6d6
Moved Dom and Selector assertions from ActionDispatch to ActionView.
2014-06-16 21:04:01 +02:00
Timm
2ff60e8648
Removed tag.rb since it has been deprecated.
2014-06-15 23:40:55 +02:00
wycats
ddc584e89e
Restructure TemplateAssertions-related code to eliminate circular requires.
...
Also, no need to include dependencies in AS::Concerns inside included blocks.
2011-05-22 23:13:44 -07:00
José Valim
c3c349ec3e
Remove assert_valid. It was already deprecated on Rails 2.3.
2010-07-19 22:35:17 +02:00
Joshua Peek
1004fcb767
Fixed AD assertion autoloads [ #3470 state:resolved]
2009-11-09 21:38:01 -06:00
Joshua Peek
7b3b7cb2ab
Move generic assertions into ActionDispatch
2009-04-30 11:55:53 -05:00