Sha256: e8860be23ccd06da80301c7e2680456c08db7d230f947b4f8bc340a28591fe8d

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

require 'test_helper'

describe Rewritten do

  before{
    Rewritten.add_translation('/from', '/to')
    Rewritten.add_translation('/from2', '/to')
    Rewritten.add_translation('/from3', '/to2')
  }

  it "must give all tos" do
    Rewritten.all_tos.sort.must_equal ["/to", "/to2"] 
  end

  it "must return all translations" do
    expected = { "/to" => ['/from', '/from2'], "/to2" => ['/from3']}
    Rewritten.all_translations.must_equal expected
  end

end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rewritten-0.7.0 test/rewritten_test.rb
rewritten-0.6.0 test/rewritten_test.rb