Skip to content

Commit f7c2b24

Browse files
authored
Merge pull request #25 from manucodin/develop
Adds Homebrew support for installation
2 parents a9342a5 + 415898b commit f7c2b24

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ A powerful Swift CLI tool that automatically generates comprehensive mock object
2525

2626
### Installation
2727

28+
#### 🍺 Homebrew (Recommended)
29+
30+
```bash
31+
brew tap manucodin/swift-mock-generator
32+
brew install swift-mock-generator
33+
```
34+
2835
#### Manually
2936

3037
```bash
@@ -287,7 +294,7 @@ class LoggerDummy: Logger {
287294
make help # Show all available commands
288295
make install # Build and install system-wide
289296
make uninstall # Remove from system
290-
make test # Run test suite (99 tests)
297+
make test # Run test suite
291298
make coverage # Run tests with coverage report
292299
make demo # See the tool in action with examples
293300
make clean # Clean build artifacts

Tests/SwiftMockGeneratorTests/BDDStyleTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,6 @@ final class BDDStyleTests: XCTestCase {
836836

837837
func testMockGenerator_givenExistingTestableImport_whenAddingTestableImport_thenDoesNotDuplicate() {
838838
// Given
839-
let sut = StubGenerator()
840839
let existingCode = """
841840
@testable import ExistingModule
842841
@@ -859,7 +858,6 @@ final class BDDStyleTests: XCTestCase {
859858
let tempDir = NSTemporaryDirectory() + UUID().uuidString
860859
try! FileManager.default.createDirectory(atPath: tempDir, withIntermediateDirectories: true)
861860

862-
let sut = MockGenerator(inputPath: tempDir, outputPath: ".", verbose: false, moduleName: nil)
863861
let originalCode = """
864862
// MARK: - Generated Stub
865863
class TestStub {}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# typed: false
2+
# frozen_string_literal: true
3+
4+
# This file was generated automatically by GitHub Actions
5+
# Do not edit this file manually. It will be overwritten on each release.
6+
7+
class SwiftMockGenerator < Formula
8+
desc "Generate Swift mocks from annotated source code"
9+
homepage "https://github.com/manucodin/SwiftMockGenerator"
10+
url "https://github.com/manucodin/SwiftMockGenerator/archive/refs/tags/VERSION_PLACEHOLDER.tar.gz"
11+
sha256 "SHA256_PLACEHOLDER"
12+
license "MIT"
13+
14+
depends_on :macos, :>= :monterey
15+
depends_on xcode: ["15.0", :build]
16+
17+
def install
18+
system "swift", "build", "-c", "release", "--disable-sandbox"
19+
bin.install ".build/release/swift-mock-generator"
20+
end
21+
22+
test do
23+
system "#{bin}/swift-mock-generator", "--help"
24+
end
25+
end
26+

0 commit comments

Comments
 (0)