Sha256: c35297caf1a9a0c68e440664e97cfc2e3b1ce5edc1ce94a438ff727054cf55f0

Contents?: true

Size: 1.03 KB

Versions: 32

Compression:

Stored size: 1.03 KB

Contents

require "spec_helper"
require "autotest/rails_rspec2"

describe Autotest::RailsRspec2 do

  let(:rails_rspec2_autotest) { Autotest::RailsRspec2.new }

  describe 'exceptions' do
    let(:exceptions_regexp) { rails_rspec2_autotest.exceptions }

    it "should match './log/test.log'" do
      exceptions_regexp.should match('./log/test.log')
    end

    it "should match 'log/test.log'" do
      exceptions_regexp.should match('log/test.log')
    end

    it "should not match './spec/models/user_spec.rb'" do
      exceptions_regexp.should_not match('./spec/models/user_spec.rb')
    end

    it "should not match 'spec/models/user_spec.rb'" do
      exceptions_regexp.should_not match('spec/models/user_spec.rb')
    end
  end

  describe 'mappings' do
    it 'runs model specs when support files change' do
      rails_rspec2_autotest.find_order = %w(spec/models/user_spec.rb spec/support/blueprints.rb)
      rails_rspec2_autotest.test_files_for('spec/support/blueprints.rb').should(
        include('spec/models/user_spec.rb'))
    end
  end

end

Version data entries

32 entries across 27 versions & 4 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
rspec-rails-2.11.4 spec/autotest/rails_rspec2_spec.rb
gem_repackager-0.1.0 support/gems/rspec-rails-2.11.0/spec/autotest/rails_rspec2_spec.rb
rspec-rails-2.11.0 spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/autotest/rails_rspec2_spec.rb
rspec-rails-2.10.1 spec/autotest/rails_rspec2_spec.rb
rspec-rails-2.10.0 spec/autotest/rails_rspec2_spec.rb
rspec-rails-2.9.0 spec/autotest/rails_rspec2_spec.rb
rspec-rails-2.9.0.rc2 spec/autotest/rails_rspec2_spec.rb