Sha256: 282c11e4d161236f1d6170c01b6de466ccf59bc0808ce8449052d4585253d182

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'

class IdentityDialect < Wookie::Dialect::Base
  def to_wookie(str); str; end
  def from_wookie(str); str; end
end

describe Wookie::Translator do
  before do
    @t       = Wookie::Translator.new(dialect: IdentityDialect)
    @english = 'enter your text here!'
    @wookie  = 'wowhaoworc rooohurc aowokao acworcwo!'
  end

  it "translates english to english" do
    @t.to_wookie(@english).should eq(@english)
  end

  it "translates wookie to wookie" do
    @t.from_wookie(@wookie).should eq(@wookie)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wookie-translator-0.1.0 spec/wookie/identity_dialect_spec.rb