File: twitter_text_spec.rb

package info (click to toggle)
ruby-twitter-text 1.14.7%2Bconformance-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 796 kB
  • sloc: ruby: 2,917; java: 1,571; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 409 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# encoding: utf-8
require File.dirname(__FILE__) + '/spec_helper'

major, minor, patch = RUBY_VERSION.split('.')
if major.to_i == 1 && minor.to_i < 9
  describe "base" do
    before do
      $KCODE = 'NONE'
    end

    after do
      $KCODE = 'u'
    end

    it "should raise with invalid KCODE on Ruby < 1.9" do
      lambda do
        require 'twitter-text'
      end.should raise_error
    end
  end
end