Sha256: 356d11e2bcbed6b26cefc40c5ba6cdea38c448c2c88605a3189ec33e3e834994

Contents?: true

Size: 754 Bytes

Versions: 5

Compression:

Stored size: 754 Bytes

Contents

require 'spec_helper'

describe Checker::Modules::Slim do
  it 'should only check .slim files' do
    files = ['a.rb', 'b.js.erb', 'c.r', 'd.yml', 'e.yaml', 'f.coffee', 'g.slim']
    mod = Checker::Modules::Slim.new(files)
    mod.stub(:check_for_executable).and_return(true)
    mod.stub(:check_one_file).and_return(true)
    mod.should_receive(:check_one_file).with('g.slim')
    mod.should_not_receive(:check_one_file).with('f.coffee')
    mod.should_not_receive(:check_one_file).with('e.yaml')
    mod.should_not_receive(:check_one_file).with('d.yml')
    mod.should_not_receive(:check_one_file).with('a.rb')
    mod.should_not_receive(:check_one_file).with('b.js.erb')
    mod.should_not_receive(:check_one_file).with('c.r')
    mod.check
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
checker-0.6.4 spec/checker/modules/slim_spec.rb
checker-0.6.3 spec/checker/modules/slim_spec.rb
checker-0.6.2 spec/checker/modules/slim_spec.rb
checker-0.6.1 spec/checker/modules/slim_spec.rb
checker-0.0.6 spec/checker/modules/slim_spec.rb