diff options
Diffstat (limited to 'spec/ruby/core/encoding/ascii_compatible_spec.rb')
-rw-r--r-- | spec/ruby/core/encoding/ascii_compatible_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/core/encoding/ascii_compatible_spec.rb b/spec/ruby/core/encoding/ascii_compatible_spec.rb new file mode 100644 index 0000000000..db3c31c9fb --- /dev/null +++ b/spec/ruby/core/encoding/ascii_compatible_spec.rb @@ -0,0 +1,13 @@ +require File.expand_path('../../../spec_helper', __FILE__) + +with_feature :encoding do + describe "Encoding#ascii_compatible?" do + it "returns true if self represents an ASCII-compatible encoding" do + Encoding::UTF_8.ascii_compatible?.should be_true + end + + it "returns false if self does not represent an ASCII-compatible encoding" do + Encoding::UTF_16LE.ascii_compatible?.should be_false + end + end +end |