Skip to content

Commit

Permalink
DEV: Don't run dev-only code in specs (discourse#23427)
Browse files Browse the repository at this point in the history
This was causing the following notice to be printed out when running system specs:

```
I did no detect a custom `config/dev.yml` file, creating one for you where you can amend defaults.
```

(since 61571be)
  • Loading branch information
CvX authored Sep 6, 2023
1 parent 769e0c0 commit ee3ac73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/discourse_dev/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialize
if File.exist?(file_path)
user_config = YAML.load_file(file_path, permitted_classes: [Date])
else
puts "I did no detect a custom `config/dev.yml` file, creating one for you where you can amend defaults."
puts "Did not detect `config/dev.yml`, creating one for you where you can amend defaults."
FileUtils.cp(default_file_path, file_path)
user_config = {}
end
Expand Down
2 changes: 1 addition & 1 deletion lib/faker/discourse_markdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def load_image(image)

def available_methods
methods = super
methods << :image if ::DiscourseDev.config.post[:include_images]
methods << :image if Rails.env.dev? && ::DiscourseDev.config.post[:include_images]
methods
end
end
Expand Down

0 comments on commit ee3ac73

Please sign in to comment.