diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 0000000..ed9fd4c --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,29 @@ +name: Ruby CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.7', '3.0', '3.2', '3.4'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + + - name: Run tests + run: ./bin/rspec + + - name: Run RuboCop + run: ./bin/rubocop --fail-level=error diff --git a/.rubocop.yml b/.rubocop.yml index 0332cb0..9a39ccf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,4 @@ -require: +plugins: - rubocop-rspec AllCops: diff --git a/spec/fc_enrich/fake_client_spec.rb b/spec/fc_enrich/fake_client_spec.rb index 3e9a0a7..8e69235 100644 --- a/spec/fc_enrich/fake_client_spec.rb +++ b/spec/fc_enrich/fake_client_spec.rb @@ -15,7 +15,7 @@ module FcEnrich it 'works for /v3/person.enrich that do not exist' do data = subject.post("/v3/person.enrich", { email: "someone@mail.com" }) - expect(data).to be_blank + expect(data).to be_nil end it 'works for /v3/company.enrich' do @@ -25,7 +25,7 @@ module FcEnrich it 'works for /v3/company.enrich that do not exist' do data = subject.post("/v3/company.enrich", { domain: "someone.com" }) - expect(data).to be_blank + expect(data).to be_nil end it 'allows to change folder' do