Sha256: e89ab1176c471f5f6565dcc44ede7019137e8db1934db4b46f4df7825ad5d70c

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

describe Checker::Modules::Pry do
  it 'should check all files' do
    files = ['a.rb', 'b.js.erb', 'c.r', 'd.yaml', 'e.yml', 'f.coffee']
    mod = Checker::Modules::Pry.new(files)
    mod.stub(:check_one).and_return(stub(:success? => true, :status => :ok))
    mod.should_receive(:check_one).exactly(6).times
    mod.check 
  end

  it "should not find the pry or remote_pry" do
    files = [fixture("pry", "without_pry.rb")]
    mod = Checker::Modules::Pry.new(files)
    mod.check.should be_true
  end

  it "should find the pry or remote_pry" do
    files = [fixture("pry", "with_pry.rb")]
    mod = Checker::Modules::Pry.new(files)
    mod.check.should be_false
  end

  it "should find the pry or remote_pry" do
    files = [fixture("pry", "with_pry_remote.rb")]
    mod = Checker::Modules::Pry.new(files)
    mod.check.should be_false
  end

  it "should find the pry or remote_pry" do
    files = [fixture("pry", "with_both.rb")]
    mod = Checker::Modules::Pry.new(files)
    mod.check.should be_false
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
checker-0.7.0 spec/checker/modules/pry_spec.rb
checker-0.6.6 spec/checker/modules/pry_spec.rb
checker-0.6.5 spec/checker/modules/pry_spec.rb
checker-0.6.5.rc2 spec/checker/modules/pry_spec.rb
checker-0.6.5.rc1 spec/checker/modules/pry_spec.rb