Sha256: 9cfaf34d5f07b2470f7880b57847effef1136123ab76799abcea41ad9073ef67

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

require 'spec_helper'

module InfinityTest
  module ApplicationLibrary
    describe RubyGems do
      let(:rubygems) { RubyGems.new }

      describe '#application' do
        it { rubygems.application.should equal InfinityTest.application }
      end

      describe '#lib_pattern' do

        it { rubygems.lib_pattern.should == "^lib/*/(.*)\.rb" }

        it "should be possible to change the library pattern" do
          rubygems.lib_pattern = "^another_lib/*/(.*)\.rb"
          rubygems.lib_pattern.should == "^another_lib/*/(.*)\.rb"
        end

      end

      describe '#test_pattern' do

        it "should return the pattern for Test::Unit" do
          stub_application_with_test_unit
          rubygems.test_pattern.should == "^test/*/(.*)_test.rb"
        end

        it "should return the pattern for Rspec" do
          stub_application_with_rspec
          rubygems.test_pattern.should == "^spec/*/(.*)_spec.rb"
        end

      end

      describe '#test_helper_pattern' do
        it "should return the pattern for Test::Unit" do
          stub_application_with_test_unit
          rubygems.test_helper_pattern.should == "^test/*/test_helper.rb"
        end

        it "should return the pattern for Rspec" do
          stub_application_with_rspec
          rubygems.test_helper_pattern.should == "^spec/*/spec_helper.rb"
        end

      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
infinity_test-1.0.3 spec/infinity_test/application_library/rubygems_spec.rb
infinity_test-1.0.2 spec/infinity_test/application_library/rubygems_spec.rb
infinity_test-1.0.1 spec/infinity_test/application_library/rubygems_spec.rb
infinity_test-1.0.0 spec/infinity_test/application_library/rubygems_spec.rb