Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dorianmariecom committed Apr 2, 2024
1 parent 2f2fd1a commit e16a71a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on: push
jobs:
bundler-audit:
name: Bundler Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bin/bundler-audit check --update
rspec:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true
- run: bin/test
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bin/rubocop
yarn-audit:
name: Yarn Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: yarn audit
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,29 @@ PATH
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.5.1)
json (2.7.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)

PLATFORMS
arm64-darwin-23
ruby

DEPENDENCIES
dorian-anonymize-json!
rspec

RUBY VERSION
ruby 3.3.0p0
Expand Down
7 changes: 7 additions & 0 deletions spec/anonymize_json_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "spec_helper"

RSpec.describe "dorian-anonymize-json" do
it "works" do
expect(`bin/anonymize-json '{"a":"Secret123"}'`).to eq(%({\n "a": "Aaaaaa000"\n}\n))
end
end
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "rspec"

0 comments on commit e16a71a

Please sign in to comment.