Sha256: 6f965909f0c84094b3f452c904b7090f643af817dd589b07348fc465001f5162

Contents?: true

Size: 699 Bytes

Versions: 11

Compression:

Stored size: 699 Bytes

Contents

require "rubygems"
require "bundler/setup"
require "HyakuninIssyu"
require "moji"

RSpec.configure do |config|
  config.mock_framework = :rspec
end

RSpec::Matchers.define :include_kanji do |channel, expected_message|
  match do |str|
		result = false
		str.split(//u).each do |char|
			result = true if Moji.type?(char, Moji::ZEN_KANJI)
		end
		result
  end
end

RSpec::Matchers.define :include_kana do |channel, expected_message|
  match do |str|
		result = false
		str.split(//u).each do |char|
			result = true if Moji.type?(char, Moji::ZEN_HIRA)
		end
		result
  end
end

RSpec::Matchers.define :be_english do |channel, expected_message|
  match do |str|
		Moji.type?(str, Moji::HAN)
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
hyakunin-issyu-1.0.1 spec/spec_helper.rb
hyakunin-issyu-1.0.0 spec/spec_helper.rb
hyakunin-issyu-0.8.1 spec/spec_helper.rb
HyakuninIssyu-0.8.0 spec/spec_helper.rb
HyakuninIssyu-0.7.7 spec/spec_helper.rb
HyakuninIssyu-0.7.6 spec/spec_helper.rb
HyakuninIssyu-0.7.5 spec/spec_helper.rb
HyakuninIssyu-0.7.4 spec/spec_helper.rb
HyakuninIssyu-0.7.3 spec/spec_helper.rb
HyakuninIssyu-0.7.2 spec/spec_helper.rb
HyakuninIssyu-0.7.0 spec/spec_helper.rb