Sha256: 23faeb8be4b1e5dbd2c20924276fe47a798e8801d4b0ddd9e38bc64db181a8cd

Contents?: true

Size: 1.21 KB

Versions: 8

Compression:

Stored size: 1.21 KB

Contents

# encoding: UTF-8
require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')

class EmojiController < ApplicationController
  def index
    render :inline => "<%= emoji_table.black_sun_with_rays %>", :layout => true
  end
  def with_unicode
    render :inline => "てすと<%= emoji_table.black_sun_with_rays %>", :layout => true
  end
end

feature 'emoji table' do
  scenario 'for docomo', :driver => :docomo do
    visit '/emoji'
    page.source.should match("\uE63E")
  end

  scenario 'for au', :driver => :au do
    visit '/emoji'
    page.source.should match("\uEF60")
  end

  scenario 'for au SSL', :driver => :au do
    visit 'https://www.example.com/emoji'
    page.source.should match([0xF660].pack("n").force_encoding("Shift_JIS"))
  end

  scenario 'for au SSL with unicode source', :driver => :au do
    visit 'https://www.example.com/emoji/with_unicode'
    expected = "てすと".encode("Shift_JIS") + [0xF660].pack("n").force_encoding("Shift_JIS")
    page.source.should match(expected)
  end

  scenario 'for softbank', :driver => :softbank do
    visit '/emoji'
    page.source.should match("\uE04A")
  end

  scenario 'for non galakei' do
    visit '/emoji'
    page.source.should match("\u2600")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
galakei-0.13.7 spec/acceptance/emoji_table_spec.rb
galakei-0.13.6 spec/acceptance/emoji_table_spec.rb
galakei-0.13.5 spec/acceptance/emoji_table_spec.rb
galakei-0.13.4 spec/acceptance/emoji_table_spec.rb
galakei-0.13.3 spec/acceptance/emoji_table_spec.rb
galakei-0.13.2 spec/acceptance/emoji_table_spec.rb
galakei-0.13.1 spec/acceptance/emoji_table_spec.rb
galakei-0.13.0 spec/acceptance/emoji_table_spec.rb