Sha256: f5fa9c39c37c66631c5280c79c322d829f3b636645fec8c293c153a19210f53d

Contents?: true

Size: 1.22 KB

Versions: 28

Compression:

Stored size: 1.22 KB

Contents

require 'mocha-on-bacon'
require File.expand_path('../../../motion_stub', __FILE__)
require 'bubble-wrap'

describe BubbleWrap::Ext::ConfigTask do

  before do
    klass = Class.new do
      def initialize
        @files = [ '/fake/a', '/fake/b' ]
        @dependencies = {}
      end

      def files_dependencies
      end
    end
    klass.send(:include, BubbleWrap::Ext::ConfigTask)
    @subject = klass.new
  end

  describe '.included' do
    it 'aliases :files_dependencies to :files_dependencies_without_bubblewrap' do
      @subject.respond_to?(:files_dependencies_without_bubblewrap).should == true
    end

    it 'aliass :files_dependencies_with_bubblewrap to :files_dependencies' do
      @subject.method(:files_dependencies).should == @subject.method(:files_dependencies_with_bubblewrap)
    end
  end

  describe '#path_matching_expression' do
    it 'returns a regular expression' do
      @subject.path_matching_expression.is_a?(Regexp).should == true
    end
  end

  describe '#files_dependencies_with_bubblewrap' do
    it 'should call #path_matching_expression' do
      @subject.expects(:path_matching_expression).twice().returns(/^\.?\//)
      @subject.files_dependencies_with_bubblewrap '/fake/a' => '/fake/b'
    end
  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
bubble-wrap-1.9.7 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.9.6 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.9.5 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.9.4 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.9.3 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.9.2 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.9.1 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.9.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.8.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.7.1 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.7.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.6.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.6.0.rc1 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.5.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.5.0.rc1 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.4.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.3.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.3.0.osx spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.2.0 spec/lib/bubble-wrap/ext/motion_project_config_spec.rb
bubble-wrap-1.2.0.pre spec/lib/bubble-wrap/ext/motion_project_config_spec.rb