Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rubocop offenses in specs #120

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 22 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,43 @@ orbs:
solidusio_extensions: solidusio/extensions@volatile

jobs:
run-specs:
parameters:
solidus:
type: string
default: main
db:
type: string
default: "postgres"
ruby:
type: string
default: "3.2"
executor:
name: solidusio_extensions/<< parameters.db >>
ruby_version: << parameters.ruby >>
run-specs-with-sqlite:
executor: solidusio_extensions/sqlite
steps:
- checkout
- browser-tools/install-chrome
- solidusio_extensions/run-tests-solidus-<< parameters.solidus >>

- solidusio_extensions/run-tests
run-specs-with-postgres:
executor: solidusio_extensions/postgres
steps:
- browser-tools/install-chrome
- solidusio_extensions/run-tests
run-specs-with-mysql:
executor: solidusio_extensions/mysql
steps:
- browser-tools/install-chrome
- solidusio_extensions/run-tests
lint-code:
executor:
name: solidusio_extensions/sqlite
ruby_version: "3.0"
executor: solidusio_extensions/sqlite-memory
steps:
- solidusio_extensions/lint-code

workflows:
"Run specs on supported Solidus versions":
jobs:
- run-specs:
name: &name "run-specs-solidus-<< matrix.solidus >>-ruby-<< matrix.ruby >>-db-<< matrix.db >>"
matrix:
parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
- run-specs:
name: *name
matrix:
parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] }
- run-specs:
name: *name
matrix:
parameters: { solidus: ["older"], ruby: ["3.0"], db: ["sqlite"] }
- run-specs-with-sqlite
- run-specs-with-postgres
- run-specs-with-mysql
- lint-code

"Weekly run specs against master":
"Weekly run specs against main":
triggers:
- schedule:
cron: "0 0 * * 4" # every Thursday
filters:
branches:
only:
- master
- main
jobs:
- run-specs:
name: *name
matrix:
parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
- run-specs:
name: *name
matrix:
parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] }
- run-specs-with-sqlite
- run-specs-with-postgres
- run-specs-with-mysql
4 changes: 2 additions & 2 deletions spec/models/spree/inventory_unit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Spree
end

context 'if the unit is not part of an assembly' do
it 'will return the percentage of a line item' do
it 'returns the percentage of a line item' do
expect(subject.percentage_of_line_item).to eql(BigDecimal(1))
end
end
Expand All @@ -31,7 +31,7 @@ module Spree
order.create_proposed_shipments
end

it 'will return the percentage of a line item' do
it 'returns the percentage of a line item' do
subject.line_item = line_item
expect(subject.percentage_of_line_item).to eql(BigDecimal(0.5, 2))
end
Expand Down