Sha256: ddfa3d4431d397e0f4957ee1abd60ff98afb9c3b270179de58f3ae1ec553fbb7

Contents?: true

Size: 850 Bytes

Versions: 1

Compression:

Stored size: 850 Bytes

Contents

require 'helper'

module Nutella
  
  class TestProject < MiniTest::Test
    
    def setup
      Dir.chdir NUTELLA_HOME
      Nutella.executeCommand "new", ["test_project"]
      Dir.chdir NUTELLA_HOME + "test_project"
    end
    
    should "return true if the dir is a nutella project" do
      assert Nutella.currentProject.exist?
    end
    
    should "return false if the dir is not a nutella project" do
      Dir.chdir NUTELLA_HOME
      refute Nutella.currentProject.exist?
    end
    
    should "return the correct version of nutella as read from the project configuration file" do
      assert_equal File.open(NUTELLA_HOME+"VERSION", "rb").read, Nutella.currentProject.config["nutella_version"]
    end
    
    
    def teardown
      FileUtils.rm_rf(NUTELLA_HOME + "test_project")
      Dir.chdir NUTELLA_HOME
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nutella_framework-0.1.2 test/config/test_project.rb