-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from BurdetteLamar/readme
Readme
- Loading branch information
Showing
11 changed files
with
320 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,102 @@ | ||
# MinitestLucid | ||
# Minitest Lucid | ||
|
||
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/minitest_lucid`. To experiment with that code, run `bin/console` for an interactive prompt. | ||
Use ```minitest_lucid``` to improve error messages from ```minitest```. | ||
|
||
TODO: Delete this and the text above, and describe your gem | ||
|
||
## Installation | ||
## Supported Classes | ||
|
||
Add this line to your application's Gemfile: | ||
- [Hash](#hash) | ||
|
||
```ruby | ||
gem 'minitest_lucid' | ||
``` | ||
|
||
And then execute: | ||
|
||
$ bundle | ||
|
||
Or install it yourself as: | ||
|
||
$ gem install minitest_lucid | ||
### Hash | ||
|
||
## Usage | ||
#### assert_equal | ||
|
||
TODO: Write usage instructions here | ||
Here are the hashes, expected and actual, that we'll use for comparison: | ||
|
||
## Development | ||
```data.rb```: | ||
```ruby | ||
def expected | ||
{ | ||
:tauro => 'Cia ina do ip ocat doat.', | ||
:loquens => 'Dua sarat rad noad maat caea.', | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
:offab => 'Ut dolore ua consal vaba caea.', | ||
:moam => 'Sunt sed te coma teu alaaame.', | ||
} | ||
end | ||
def actual | ||
{ | ||
:laboru => 'Laboab vaga dat maaua in venima.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
:loquens => 'dua sarat rad noad maat caea.', | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:tauro => 'cia ina do ip ocat doat.', | ||
:amcae => 'Utatu cilaa cit siat commag seqa.', | ||
} | ||
end | ||
``` | ||
|
||
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. | ||
The default message: | ||
|
||
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). | ||
```default.txt```: | ||
```diff | ||
--- expected | ||
+++ actual | ||
@@ -1 +1 @@ | ||
-{:tauro=>"Cia ina do ip ocat doat.", :loquens=>"Dua sarat rad noad maat caea.", :lor=>"Eser in dolo eaata labor ut.", :dolo=>"Ipaat paal doat iruat ala magabor.", :offab=>"Ut dolore ua consal vaba caea.", :moam=>"Sunt sed te coma teu alaaame."} | ||
+{:laboru=>"Laboab vaga dat maaua in venima.", :dolo=>"Ipaat paal doat iruat ala magabor.", :loquens=>"dua sarat rad noad maat caea.", :lor=>"Eser in dolo eaata labor ut.", :tauro=>"cia ina do ip ocat doat.", :amcae=>"Utatu cilaa cit siat commag seqa."} | ||
``` | ||
|
||
## Contributing | ||
Message using ```make_my_diffs_pretty!```: | ||
|
||
```better.txt```: | ||
```diff | ||
--- expected | ||
+++ actual | ||
@@ -1,6 +1,6 @@ | ||
-{:tauro=>"Cia ina do ip ocat doat.", | ||
- :loquens=>"Dua sarat rad noad maat caea.", | ||
- :lor=>"Eser in dolo eaata labor ut.", | ||
+{:laboru=>"Laboab vaga dat maaua in venima.", | ||
:dolo=>"Ipaat paal doat iruat ala magabor.", | ||
- :offab=>"Ut dolore ua consal vaba caea.", | ||
- :moam=>"Sunt sed te coma teu alaaame."} | ||
+ :loquens=>"dua sarat rad noad maat caea.", | ||
+ :lor=>"Eser in dolo eaata labor ut.", | ||
+ :tauro=>"cia ina do ip ocat doat.", | ||
+ :amcae=>"Utatu cilaa cit siat commag seqa."} | ||
``` | ||
|
||
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/minitest_lucid. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. | ||
Message using ```minitest_lucid``` | ||
|
||
## License | ||
```lucid.txt```: | ||
```ruby | ||
|
||
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). | ||
elucidation = { | ||
:missing_pairs => { | ||
:offab => 'Ut dolore ua consal vaba caea.', | ||
:moam => 'Sunt sed te coma teu alaaame.', | ||
}, | ||
:unexpected_pairs => { | ||
:laboru => 'Laboab vaga dat maaua in venima.', | ||
:amcae => 'Utatu cilaa cit siat commag seqa.', | ||
}, | ||
:changed_values => { | ||
:tauro => { | ||
:expected => 'Cia ina do ip ocat doat.', | ||
:got => 'cia ina do ip ocat doat.', | ||
}, | ||
:loquens => { | ||
:expected => 'Dua sarat rad noad maat caea.', | ||
:got => 'dua sarat rad noad maat caea.', | ||
}, | ||
}, | ||
:ok_pairs => { | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
}, | ||
} | ||
``` | ||
|
||
## Code of Conduct | ||
|
||
Everyone interacting in the MinitestLucid project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/minitest_lucid/blob/master/CODE_OF_CONDUCT.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
require 'minitest/autorun' | ||
require 'set' | ||
|
||
require 'minitest_lucid/version' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Minitest Lucid | ||
|
||
Use ```minitest_lucid``` to improve error messages from ```minitest```. | ||
|
||
|
||
## Supported Classes | ||
|
||
- [Hash](#hash) | ||
|
||
### Hash | ||
|
||
#### assert_equal | ||
|
||
Here are the hashes, expected and actual, that we'll use for comparison: | ||
|
||
```data.rb```: | ||
```ruby | ||
def expected | ||
{ | ||
:tauro => 'Cia ina do ip ocat doat.', | ||
:loquens => 'Dua sarat rad noad maat caea.', | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
:offab => 'Ut dolore ua consal vaba caea.', | ||
:moam => 'Sunt sed te coma teu alaaame.', | ||
} | ||
end | ||
def actual | ||
{ | ||
:laboru => 'Laboab vaga dat maaua in venima.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
:loquens => 'dua sarat rad noad maat caea.', | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:tauro => 'cia ina do ip ocat doat.', | ||
:amcae => 'Utatu cilaa cit siat commag seqa.', | ||
} | ||
end | ||
``` | ||
|
||
The default message: | ||
|
||
```default.txt```: | ||
``` | ||
--- expected | ||
+++ actual | ||
@@ -1 +1 @@ | ||
-{:tauro=>"Cia ina do ip ocat doat.", :loquens=>"Dua sarat rad noad maat caea.", :lor=>"Eser in dolo eaata labor ut.", :dolo=>"Ipaat paal doat iruat ala magabor.", :offab=>"Ut dolore ua consal vaba caea.", :moam=>"Sunt sed te coma teu alaaame."} | ||
+{:laboru=>"Laboab vaga dat maaua in venima.", :dolo=>"Ipaat paal doat iruat ala magabor.", :loquens=>"dua sarat rad noad maat caea.", :lor=>"Eser in dolo eaata labor ut.", :tauro=>"cia ina do ip ocat doat.", :amcae=>"Utatu cilaa cit siat commag seqa."} | ||
``` | ||
|
||
Message using ```make_my_diffs_pretty!```: | ||
|
||
```better.txt```: | ||
``` | ||
--- expected | ||
+++ actual | ||
@@ -1,6 +1,6 @@ | ||
-{:tauro=>"Cia ina do ip ocat doat.", | ||
- :loquens=>"Dua sarat rad noad maat caea.", | ||
- :lor=>"Eser in dolo eaata labor ut.", | ||
+{:laboru=>"Laboab vaga dat maaua in venima.", | ||
:dolo=>"Ipaat paal doat iruat ala magabor.", | ||
- :offab=>"Ut dolore ua consal vaba caea.", | ||
- :moam=>"Sunt sed te coma teu alaaame."} | ||
+ :loquens=>"dua sarat rad noad maat caea.", | ||
+ :lor=>"Eser in dolo eaata labor ut.", | ||
+ :tauro=>"cia ina do ip ocat doat.", | ||
+ :amcae=>"Utatu cilaa cit siat commag seqa."} | ||
``` | ||
|
||
Message using ```minitest_lucid``` | ||
|
||
```lucid.txt```: | ||
``` | ||
elucidation = { | ||
:missing_pairs => { | ||
:offab => 'Ut dolore ua consal vaba caea.', | ||
:moam => 'Sunt sed te coma teu alaaame.', | ||
}, | ||
:unexpected_pairs => { | ||
:laboru => 'Laboab vaga dat maaua in venima.', | ||
:amcae => 'Utatu cilaa cit siat commag seqa.', | ||
}, | ||
:changed_values => { | ||
:tauro => { | ||
:expected => 'Cia ina do ip ocat doat.', | ||
:got => 'cia ina do ip ocat doat.', | ||
}, | ||
:loquens => { | ||
:expected => 'Dua sarat rad noad maat caea.', | ||
:got => 'dua sarat rad noad maat caea.', | ||
}, | ||
}, | ||
:ok_pairs => { | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
}, | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- expected | ||
+++ actual | ||
@@ -1,6 +1,6 @@ | ||
-{:tauro=>"Cia ina do ip ocat doat.", | ||
- :loquens=>"Dua sarat rad noad maat caea.", | ||
- :lor=>"Eser in dolo eaata labor ut.", | ||
+{:laboru=>"Laboab vaga dat maaua in venima.", | ||
:dolo=>"Ipaat paal doat iruat ala magabor.", | ||
- :offab=>"Ut dolore ua consal vaba caea.", | ||
- :moam=>"Sunt sed te coma teu alaaame."} | ||
+ :loquens=>"dua sarat rad noad maat caea.", | ||
+ :lor=>"Eser in dolo eaata labor ut.", | ||
+ :tauro=>"cia ina do ip ocat doat.", | ||
+ :amcae=>"Utatu cilaa cit siat commag seqa."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def expected | ||
{ | ||
:tauro => 'Cia ina do ip ocat doat.', | ||
:loquens => 'Dua sarat rad noad maat caea.', | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
:offab => 'Ut dolore ua consal vaba caea.', | ||
:moam => 'Sunt sed te coma teu alaaame.', | ||
} | ||
end | ||
def actual | ||
{ | ||
:laboru => 'Laboab vaga dat maaua in venima.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
:loquens => 'dua sarat rad noad maat caea.', | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:tauro => 'cia ina do ip ocat doat.', | ||
:amcae => 'Utatu cilaa cit siat commag seqa.', | ||
} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- expected | ||
+++ actual | ||
@@ -1 +1 @@ | ||
-{:tauro=>"Cia ina do ip ocat doat.", :loquens=>"Dua sarat rad noad maat caea.", :lor=>"Eser in dolo eaata labor ut.", :dolo=>"Ipaat paal doat iruat ala magabor.", :offab=>"Ut dolore ua consal vaba caea.", :moam=>"Sunt sed te coma teu alaaame."} | ||
+{:laboru=>"Laboab vaga dat maaua in venima.", :dolo=>"Ipaat paal doat iruat ala magabor.", :loquens=>"dua sarat rad noad maat caea.", :lor=>"Eser in dolo eaata labor ut.", :tauro=>"cia ina do ip ocat doat.", :amcae=>"Utatu cilaa cit siat commag seqa."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
require 'minitest/autorun' | ||
|
||
class Example < Minitest::Test | ||
|
||
require_relative 'data' | ||
|
||
def test_assert_equal | ||
begin | ||
assert_equal(expected, actual) | ||
rescue Minitest::Assertion => x | ||
File.open('default.txt', 'w') do |file| | ||
file.write(x.message) | ||
end | ||
end | ||
begin | ||
Minitest::Test.make_my_diffs_pretty! | ||
assert_equal(expected, actual) | ||
rescue Minitest::Assertion => x | ||
File.open('better.txt', 'w') do |file| | ||
file.write(x.message) | ||
end | ||
end | ||
begin | ||
require 'minitest_lucid' | ||
assert_equal(expected, actual) | ||
rescue Minitest::Assertion => x | ||
File.open('lucid.txt', 'w') do |file| | ||
file.write(x.message) | ||
end | ||
end | ||
end | ||
|
||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
elucidation = { | ||
:missing_pairs => { | ||
:offab => 'Ut dolore ua consal vaba caea.', | ||
:moam => 'Sunt sed te coma teu alaaame.', | ||
}, | ||
:unexpected_pairs => { | ||
:laboru => 'Laboab vaga dat maaua in venima.', | ||
:amcae => 'Utatu cilaa cit siat commag seqa.', | ||
}, | ||
:changed_values => { | ||
:tauro => { | ||
:expected => 'Cia ina do ip ocat doat.', | ||
:got => 'cia ina do ip ocat doat.', | ||
}, | ||
:loquens => { | ||
:expected => 'Dua sarat rad noad maat caea.', | ||
:got => 'dua sarat rad noad maat caea.', | ||
}, | ||
}, | ||
:ok_pairs => { | ||
:lor => 'Eser in dolo eaata labor ut.', | ||
:dolo => 'Ipaat paal doat iruat ala magabor.', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#### assert_equal | ||
|
||
Here are the hashes, expected and actual, that we'll use for comparison: | ||
|
||
@[ruby](data.rb) | ||
|
||
The default message: | ||
|
||
@[diff](default.txt) | ||
|
||
Message using ```make_my_diffs_pretty!```: | ||
|
||
@[diff](better.txt) | ||
|
||
Message using ```minitest_lucid``` | ||
|
||
@[ruby](lucid.txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Hash | ||
|
||
@[:markdown](assert_equal/template.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Minitest Lucid | ||
|
||
Use ```minitest_lucid``` to improve error messages from ```minitest```. | ||
|
||
|
||
## Supported Classes | ||
|
||
- [Hash](#hash) | ||
|
||
@[:markdown](hash/template.md) | ||
|
||
|