# encoding: UTF-8 require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper') class NonStandardCharController < ApplicationController def middot render :inline => '·' end def latin render :inline => "\u00B7" end def harf_entity render :inline => "・" end def full_entity render :inline => "・" end def sdot render :inline => "⋅" end end feature 'nakaguro' do scenario "Do convert · for docomo", :driver => :docomo do visit '/non_standard_char/middot' page.body.should == "\u30FB" end %w[softbank au].each do |s| scenario "Do not convert · for #{s}", :driver => s.to_sym do visit '/non_standard_char/middot' page.body.should == "·" end end %w[au docomo].each do |s| scenario "Do convert latin dot(\u00B7) for #{s}", :driver => s.to_sym do visit '/non_standard_char/latin' page.body.should == "\uFF65" end end scenario "Do not convert latin dot(\u00B7) for softbank", :driver => :softbank do visit '/non_standard_char/latin' page.body.should == "\u00B7" end %w[softbank docomo].each do |s| scenario "Do not convert ・ for #{s}", :driver => s.to_sym do visit '/non_standard_char/harf_entity' page.body.should == "・" end end scenario "Do convert ・ for au", :driver => :au do visit '/non_standard_char/harf_entity' page.body.should == "\uFF65" end %w[docomo softbank].each do |s| scenario "Do not convert ・ for #{s}", :driver => s.to_sym do visit '/non_standard_char/full_entity' page.body.should == "・" end end scenario "Do convert ・ for au", :driver => :au do visit '/non_standard_char/full_entity' page.body.should == "\u30FB" end %w[softbank au docomo].each do |s| scenario "Do convert ⋅ to \uFF65 for #{s}", :driver => s.to_sym do visit '/non_standard_char/sdot' page.body.should == "\uFF65" end end end