Sha256: 949a490ed04894138c16e9b2a9752336ae4db8c8fc7c7249b677485a7db69699

Contents?: true

Size: 911 Bytes

Versions: 1

Compression:

Stored size: 911 Bytes

Contents

require 'spec_helper'

describe XcodeprojUtils do
  it 'should have a version number' do
    XcodeprojUtils::VERSION.should_not be_nil
  end

  describe XcodeprojUtils::Project do
    it "raise RuntimeError for a non-existing project" do
      expect { XcodeprojUtils::Project.new('Non-existing.xcodeproj', 'Target1') }.to raise_error(RuntimeError)
    end

    it "raise ArgumentError for a non-existing target" do
      expect { XcodeprojUtils::Project.new(fixture_path('RSpecTest/RSpecTest.xcodeproj'),
                                           'Non-Existing Target') }.to raise_error(ArgumentError)
    end

    it "return total lines of source code" do
      proj = XcodeprojUtils::Project.new(fixture_path('RSpecTest/RSpecTest.xcodeproj'), 'RSpecTest')
      total = proj.wc
      header = proj.wc(true)
      source = proj.wc(false, true)
      expect(total).to eq(header + source)
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xcodeproj_utils-0.1.3 spec/xcodeproj_utils_spec.rb