Fixed a few lints; changed rake task name to test:lint
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -26,7 +26,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- gem install rake
|
- gem install rake
|
||||||
- bundle config set --local path "vendor/bundle"
|
- bundle config set --local path "vendor/bundle"
|
||||||
- rake test:rubocop
|
- rake test:lint
|
||||||
|
|
||||||
gitea_release:
|
gitea_release:
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
|
2
Rakefile
2
Rakefile
@@ -32,7 +32,7 @@ namespace :test do
|
|||||||
system("rspec")
|
system("rspec")
|
||||||
end
|
end
|
||||||
|
|
||||||
task :rubocop do
|
task :lint do
|
||||||
system("rubocop src/ spec/")
|
system("rubocop src/ spec/")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -7,8 +7,11 @@ RSpec.describe(BenchmarkController) do
|
|||||||
describe 'GET /benchmark' do
|
describe 'GET /benchmark' do
|
||||||
before { get '/benchmark' }
|
before { get '/benchmark' }
|
||||||
|
|
||||||
it 'Benchmark base route redirects to /benchmark/list' do
|
it 'Benchmark base route is a redirect' do
|
||||||
expect(last_response).to(be_redirect)
|
expect(last_response).to(be_redirect)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'Benchmark base route Location header points to /benchmark/list' do
|
||||||
expect(last_response['Location']).to(eq("#{BASE_URL}/benchmark/list"))
|
expect(last_response['Location']).to(eq("#{BASE_URL}/benchmark/list"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -7,8 +7,11 @@ RSpec.describe(HardwareController) do
|
|||||||
describe 'GET /hardware' do
|
describe 'GET /hardware' do
|
||||||
before { get '/hardware' }
|
before { get '/hardware' }
|
||||||
|
|
||||||
it 'Hardware base route redirects to /hardware/list' do
|
it 'Hardware base route is a redirect' do
|
||||||
expect(last_response).to(be_redirect)
|
expect(last_response).to(be_redirect)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'Hardware base route Location header points to /hardware/list' do
|
||||||
expect(last_response['Location']).to(eq("#{BASE_URL}/hardware/list"))
|
expect(last_response['Location']).to(eq("#{BASE_URL}/hardware/list"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -7,8 +7,11 @@ RSpec.describe(TestController) do
|
|||||||
describe 'GET /test' do
|
describe 'GET /test' do
|
||||||
before { get '/test' }
|
before { get '/test' }
|
||||||
|
|
||||||
it 'Test base route redirects to /test/list' do
|
it 'Test base route is a redirect' do
|
||||||
expect(last_response).to(be_redirect)
|
expect(last_response).to(be_redirect)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'Test base route Location header points to /test/list' do
|
||||||
expect(last_response['Location']).to(eq("#{BASE_URL}/test/list"))
|
expect(last_response['Location']).to(eq("#{BASE_URL}/test/list"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -12,7 +12,6 @@ class Config
|
|||||||
@data = YAML.load_file(DEFAULT_CONFIG)
|
@data = YAML.load_file(DEFAULT_CONFIG)
|
||||||
|
|
||||||
# merge in user-defined configuration if it exists
|
# merge in user-defined configuration if it exists
|
||||||
puts "Merging #{config_path} with #{DEFAULT_CONFIG}."
|
|
||||||
@data.merge!(YAML.load_file(config_path)) if File.exist?(config_path)
|
@data.merge!(YAML.load_file(config_path)) if File.exist?(config_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user