https://github.com/codewars/sql_spec_helper
Spec helper for SQL challenges
https://github.com/codewars/sql_spec_helper
code-runner sql
Last synced: about 1 month ago
JSON representation
Spec helper for SQL challenges
- Host: GitHub
- URL: https://github.com/codewars/sql_spec_helper
- Owner: codewars
- License: mit
- Created: 2021-08-24T04:40:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-24T06:21:23.000Z (over 4 years ago)
- Last Synced: 2025-01-10T05:35:55.360Z (12 months ago)
- Topics: code-runner, sql
- Language: Ruby
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SqlSpecHelper
`spec/spec_helper.rb`
```ruby
require 'sql_spec_helper'
# Add `$sql`, `DB`, `run_sql`, `compare_with`, and `Display` to main for backwards compatibility.
$sql_spec_helper = SqlSpecHelper.new('/workspace/solution.txt')
$sql = $sql_spec_helper.sql
DB = $sql_spec_helper.db
def run_sql(...)
$sql_spec_helper.run_sql(...)
end
def compare_with(...)
$sql_spec_helper.compare_with(...)
end
Display = SqlSpecHelper::Display
```