2014-10-19 4 views
2

프로젝트 해골을 만들 수 없습니다. TEST_NAME.rb :프로젝트 해골

require "./lib/NAME.rb" 
    require "test/unit" 

    class TestNAME < Test::Unit::TestCase 

     def test_sample 
     assert_equal(4, 2+2) 
     end 

    end 

gemspec 파일 이름 NAME.gemspec 우리의 프로젝트를 설명합니다 : 당신이 모든 설정이 완료되면

# coding: utf-8 
    lib = File.expand_path('../lib', __FILE__) 
    $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 

    Gem::Specification.new do |spec| 
     spec.name   = "NAME" 
     spec.version  = '1.0' 
     spec.authors  = ["Yanzhe"] 
     spec.email   = ["[email protected]"] 
     spec.summary  = %q{About me} 
     spec.description = %q{This page is mainly about me.} 
     spec.homepage  = "http://yanzhefeng.com/" 
     spec.license  = "MIT" 

     spec.files   = ['lib/NAME.rb'] 
     spec.executables = ['bin/NAME'] 
     spec.test_files = ['tests/test_NAME.rb'] 
     spec.require_paths = ["lib"] 
    end 

, 디렉토리는 여기에 광산과 같아야합니다

skeleton/ 
     NAME.gemspec 
     Rakefile 
     data 
     ext/ 
     tests/ 
     bin/ 
      NAME 
     doc/ 
     lib/ 
      NAME 
      NAME.rb 
     lib/NAME 
     tests/ 
      test_NAME.rb 

답이 괜찮습니다.

+0

답변을 주셔서 감사합니다. – Virus

답변

2

파일 디렉토리가 올바른지 확인하십시오.

+0

감사합니다. – Virus

관련 문제