Sha256: 6f0f770751e2c2b4c943133cf03a95580ea9f3b241ba82e50be6f73beffa86d6

Contents?: true

Size: 739 Bytes

Versions: 8

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'

describe Codeqa::Checkers::CheckRspecFocus do
  it_behaves_like 'a checker'

  it 'should check spec files' do
    source = source_with('', 'file_spec.rb')
    expect(described_class.check?(source)).to be_truthy
    source = source_with('', 'file.rb')
    expect(described_class.check?(source)).to be_falsey
  end

  it 'should detect :focus' do
    source = source_with("first line\:focus\nthirdline", 'file_spec.rb')
    checker = check_with(described_class, source)
    expect(checker).to be_error
  end

  it 'should be success is all is finde ' do
    source = source_with("first line\nthirdline\n", 'file_spec.rb')
    checker = check_with(described_class, source)
    expect(checker).to be_success
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
codeqa-0.5.0 spec/lib/codeqa/checkers/check_rspec_focus_spec.rb
codeqa-0.4.2 spec/lib/codeqa/checkers/check_rspec_focus_spec.rb
codeqa-0.4.1 spec/lib/codeqa/checkers/check_rspec_focus_spec.rb
codeqa-0.4.0 spec/lib/codeqa/checkers/check_rspec_focus_spec.rb
codeqa-0.4.0.pre2 spec/lib/codeqa/checkers/check_rspec_focus_spec.rb
codeqa-0.4.0.pre spec/lib/codeqa/checkers/check_rspec_focus_spec.rb
codeqa-0.3.1 spec/lib/codeqa/checkers/check_rspec_focus_spec.rb
codeqa-0.3.0 spec/lib/codeqa/checkers/check_rspec_focus_spec.rb