Sha256: 2fabfd6627ff978515624e7cb15cd08fc14841b8a35f1d949d252b76d30b37c5

Contents?: true

Size: 839 Bytes

Versions: 3

Compression:

Stored size: 839 Bytes

Contents

# encoding: UTF-8
require "test_helper"
require "./lib/roger/test.rb"
require "roger/testing/mock_project"

module Roger
  # Testing the Roger Test fucntionality
  class TestTest < ::Test::Unit::TestCase
    def setup
      @files = ["html/javascripts/site.js",
                "html/vendor/underscore/underscore.js"]

      @project = Testing::MockProject.new

      @files.each do |file|
        @project.construct.file file
      end

      @mockupfile = Roger::Mockupfile.new(@project)
    end

    def teardown
      @project.destroy
    end

    def test_test_run_should_set_project_mode
      assert_equal @project.mode, nil

      @mockupfile.test do |t|
        t.use proc{|test|
          assert_equal test.project.mode, :test
        }
      end

      @project.test.run!
      assert_equal @project.mode, nil
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
roger-1.3.5 test/unit/test_test.rb
roger-1.3.4 test/unit/test_test.rb
roger-1.3.3 test/unit/test_test.rb