Sha256: 540135e954be76a58659e2836003266b90b5150696608dd3d9bd2bc136600dfe
Contents?: true
Size: 784 Bytes
Versions: 2
Compression:
Stored size: 784 Bytes
Contents
# encoding: utf-8 require 'test_helper' require 'ostruct' module Mayl module Commands describe Cd do before do @locales = [stub(to_s: 'ca'), stub(to_s: 'en')] @env = OpenStruct.new(locales: @locales, namespace: 'activerecord.models') end it 'enters a directory' do @command = Cd.new @env, 'post.attributes' @command.execute @env.namespace.must_equal 'activerecord.models.post.attributes' end it 'goes down one level' do @command = Cd.new @env, '..' @command.execute @env.namespace.must_equal 'activerecord' end it 'goes to the root level' do @command = Cd.new @env, '.' @command.execute @env.namespace.must_equal '' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mayl-0.1.0 | test/mayl/commands/cd_test.rb |
mayl-0.0.1 | test/mayl/commands/cd_test.rb |