Skip to content

Commit

Permalink
fix failed specs (agileware-jp#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
routetheta authored Jun 8, 2023
1 parent cebba8b commit b814eef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Gemfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ group :test do
gem 'factory_bot_rails'
gem 'launchy'
gem 'database_cleaner'
dependencies.reject! { |i| i.name == 'nokogiri' } # Ensure Nokogiri have new version
end

# for Debug
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ Please see .circleci/config.yml for more details.
% bundle exec rspec -I plugins/redmine_issue_templates/spec --format documentation plugins/redmine_issue_templates/spec/
```

By default, `chrome` is used as a webdriver. If you set the environment variable
`DRIVER` to `headless`, `headless_chrome` will be used.
By default, `headless` is added as an option. If you set the environment variable
`HEADLESS` to `0`, `headless` will be removed.

```bash
% DRIVER='headless' bundle exec rspec -I plugins/redmine_issue_templates/spec --format documentation plugins/redmine_issue_templates/spec/
% HEADLESS=0 bundle exec rspec -I plugins/redmine_issue_templates/spec --format documentation plugins/redmine_issue_templates/spec/
```

### Changelog
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# In case window size is not specified, Redmine renderes its contents with responsive mode.
#
options.add_argument('window-size=1280,800')
if ENV['DRIVER'] == 'headless'
unless ENV['HEADLESS'] == '0'
options.add_argument('headless')
options.add_argument('disable-gpu')
end
Expand Down

0 comments on commit b814eef

Please sign in to comment.