Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Add repository spec to copy simulated git repository
Browse files Browse the repository at this point in the history
  • Loading branch information
floriandejonckheere committed Mar 31, 2024
1 parent ec9fbcb commit 91f507d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--color
--require spec_helper
--tag ~repository
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AllCops:
Exclude:
- examples/**/*
- vendor/**/*
- tmp/**/*

Layout/LineLength:
Enabled: false
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ The `evaluate` command analyzes the given microservices architecture, and evalua
```bash
$ mosaik evaluate --help
```
## Development and Testing

Some test make use of a simulated git repository. If you want to use this repository for development, run the following command:

```bash
$ rspec spec/mosaik/repository_spec.rb --tag repository
```

The simulated git repository will be copied to `tmp/repository` and can be used for development.

## Releasing

Expand Down
11 changes: 11 additions & 0 deletions spec/mosaik/repository_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

RSpec.describe "Repository", :repository do
include_context "with a git repository"

it "copies the simulated git repository" do
FileUtils.mkdir_p MOSAIK.root.join("tmp/repository")

expect { FileUtils.cp_r File.join(directory, "."), MOSAIK.root.join("tmp/repository") }.not_to raise_error
end
end

0 comments on commit 91f507d

Please sign in to comment.