diff --git a/Appraisals b/Appraisals index 624e33d..a0f3607 100644 --- a/Appraisals +++ b/Appraisals @@ -1,10 +1,14 @@ -appraise 'rails3.2' do - gem 'actionpack', '~> 3.2.0' - gem 'activesupport', '~> 3.2.0' -end - appraise 'rails4.0' do gem 'actionpack', '~> 4.0.0' gem 'activesupport', '~> 4.0.0' end +appraise 'rails4.1' do + gem 'actionpack', '~> 4.1.0' + gem 'activesupport', '~> 4.1.0' +end + +appraise 'rails4.2' do + gem 'actionpack', '~> 4.2.0' + gem 'activesupport', '~> 4.2.0' +end diff --git a/lib/string_tools/core_ext/string.rb b/lib/string_tools/core_ext/string.rb index 3c08074..d514d3f 100644 --- a/lib/string_tools/core_ext/string.rb +++ b/lib/string_tools/core_ext/string.rb @@ -4,6 +4,7 @@ require 'active_support/version' require 'action_pack' require 'string_tools/string' +require 'action_controller' class String %w[auto_link excerpt highlight sanitize simple_format word_wrap].each do |method| diff --git a/spec/string_spec.rb b/spec/string_spec.rb index 741caad..731c21f 100644 --- a/spec/string_spec.rb +++ b/spec/string_spec.rb @@ -28,4 +28,23 @@ it { expect { string.remove_nonprintable! }.to change { string }.to('string with weird characters') } end + + describe '#strip_tags' do + { + 'sometext' => 'sometext', + 'sometext' => 'sometext', + '1 & 2 + 3 < 5 > 6' => '1 & 2 + 3 < 5 > 6', + '<
  • text
  • ' => 'text' => 'sometext', + 'some