Skip to content

Commit

Permalink
[command] Add spec for verbose mode
Browse files Browse the repository at this point in the history
  • Loading branch information
viteinfinite committed Jan 18, 2016
1 parent 2930bef commit ab7004c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/slather/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,29 @@ class SpecXcode7CoverageFile < Slather::ProfdataCoverageFile

end
end

describe "#verbose_mode" do

let(:fixtures_project) do
proj = Slather::Project.open(FIXTURES_PROJECT_PATH)
proj.build_directory = TEMP_DERIVED_DATA_PATH
proj.input_format = "profdata"
proj.verbose_mode = true
proj.configure
proj
end

it "should print out environment info when in verbose_mode" do

project_root = Pathname("./").realpath

["\nProcessing coverage file: #{project_root}/spec/DerivedData/Build/Intermediates/CodeCoverage/fixtures/Coverage.profdata",
"Against binary file: #{project_root}/spec/DerivedData/Build/Intermediates/CodeCoverage/fixtures/Products/Debug/fixturesTests.xctest/Contents/MacOS/fixturesTests\n\n"
].each do |line|
expect(fixtures_project).to receive(:puts).with(line)
end

fixtures_project.send(:configure)
end
end
end

0 comments on commit ab7004c

Please sign in to comment.