Sha256: b7098f1e4f5323fe19438eb903aa23103d0ee7f7fd3a139ca0e0fce5cfcd69b2
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
require_relative "spec_helper" module Nyara describe Command do it "#help" do assert_include(stdout { Nyara::Command.help },"Usage") end it "#version" do assert_equal(stdout { Nyara::Command.version }.strip,"Nyara #{Nyara::VERSION}") end describe "#new_project" do before :all do @tmp_dir = '/tmp/nyara_test' @old_dir = Dir.pwd FileUtils.mkdir_p(@tmp_dir) Dir.chdir(@tmp_dir) @app_name = "app_#{Time.now.to_i}" end after :all do FileUtils.rm_rf(@tmp_dir) Dir.chdir(@old_dir) end describe "should create app dir" do it "should run finish" do a = stdout { Nyara::Command.new_project(@app_name) } assert_include(a,"Enjoy!") end it "should copy same files in to new dir" do des_files = Dir.glob("./#{@app_name}/**/*") assert_not_equal(des_files.count,0) assert_equal(des_files.count,Dir.glob("#{@old_dir}/lib/nyara/templates/**/*").count) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nyara-0.0.1.pre.9 | spec/command_spec.rb |