Sha256: 5ee430d1577875cf1c25a06fa4fc8538b4050f0fec79158379780cd4f9a3f2bd

Contents?: true

Size: 847 Bytes

Versions: 4

Compression:

Stored size: 847 Bytes

Contents

require 'helper'

module Nutella
  
  class TestProject < MiniTest::Test

    def setup
      Dir.chdir NUTELLA_HOME
      Nutella.execute_command( 'new', ['test_project'] )
      Dir.chdir "#{NUTELLA_HOME}test_project"
    end


    should 'return true if the dir is a nutella project' do
      assert Nutella.current_project.exist?
    end
    
    should 'return false if the dir is not a nutella project' do
      Dir.chdir NUTELLA_HOME
      refute Nutella.current_project.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.current_project.config['nutella_version']
    end
    
    
    def teardown
      FileUtils.rm_rf "#{NUTELLA_HOME}test_project"
      Dir.chdir NUTELLA_HOME
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nutella_framework-0.3.1 test/config/test_project.rb
nutella_framework-0.3.0 test/config/test_project.rb
nutella_framework-0.2.1 test/config/test_project.rb
nutella_framework-0.2.0 test/config/test_project.rb