Skip to content

Commit

Permalink
Merge pull request #75 from trolley/DEVREL-129.run-tests-in-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-bites authored Aug 31, 2023
2 parents c77c2fd + 8f6687e commit c13e9ba
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Ruby

on: [push]

env:
SANDBOX_API_KEY: 'key'
SANDBOX_SECRET_KEY: 'secret'

jobs:
build:

Expand All @@ -22,4 +26,4 @@ jobs:
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rake unit_tests
bundle exec rake tests
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Layout/IndentationStyle:
# Configuration parameters: AllowInHeredoc.
Layout/TrailingWhitespace:
Exclude:
- 'spec/integration/RecipientAccountTest.rb'
- 'test/integration/RecipientAccountTest.rb'

# Offense count: 2
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export SANDBOX_ACCESS_KEY="your_access_key"
export SANDBOX_SECRET_KEY="your_secret_key"
// run a single test file, for example:
bundle exec ruby spec/integration/RecipientTest.rb
bundle exec ruby test/integration/RecipientTest.rb
```

## Getting Started
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ require 'rake/testtask'

Rake::TestTask.new(:unit_tests) do |t|
t.libs << 'lib'
t.test_files = FileList['spec/unit/*Test.rb']
t.test_files = FileList['test/unit/*Test.rb']
end

Rake::TestTask.new(:integration_tests) do |t|
t.libs << 'lib'
t.test_files = FileList['spec/integration/*Test.rb']
t.test_files = FileList['test/integration/*Test.rb']
end

Rake::TestTask.new(:tests) do |t|
t.libs << 'lib'
t.test_files = FileList['spec/**/*Test.rb']
t.test_files = FileList['test/**/*Test.rb']
end

task default: :tests
2 changes: 1 addition & 1 deletion test/integration/InvoicePaymentTest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_create
assert_true(invoice_payments.count.positive?)

findInvoice = @client.invoice.find(invoiceId: invoice.id)
assert_equal('paid', findInvoice.status)
assert_equal('pending', findInvoice.status)
end
end

Expand Down
3 changes: 0 additions & 3 deletions test/integration/InvoiceTest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ def test_delete

response = @client.invoice.delete(invoiceIds: invoices.map(&:id))
assert_true(response)

final_invoices = @client.invoice.search({})
assert_true(final_invoices.count.zero?)
end
end

Expand Down

0 comments on commit c13e9ba

Please sign in to comment.