Comments (6)
This may not be the simplest thing to do, I have noticed that the required file is not always the same as the test file... the pattern doesn't hold, for example, for the leap_year exercise. They have leap_test.rb but the required file is year, rather than leap... This makes sense for the exercise, but not for matching for automated testing.
from ruby.
Yeah, that's part of the reason why I haven't done it yet.
I would be OK with changing the name of the require, actually, if that would help, though it pains me a bit to have a leap.rb
that defines a Year
constant (another reason why I've been putting this off).
Another option would be to add a marker to the line to be replaced as a trailing comment. That would allow us to have any name for the file and still recognize it consistently.
from ruby.
Whatever the plugin says, it could be thusly done (pseudo-code):
begin
require '_test'
rescue LoadError
'File not created yet, using example.rb'
require 'example.rb'
end
class Minitest::Test
def skip ; end
end
The last monkey patches the skip method so that all tests run. The prior makes it so that example.rb
that is required anyway per the API is accounted for. The consistency is provided by example.rb
from ruby.
Oh, yeah, that would totally work.
from ruby.
I believe this has been effectively addressed...
from ruby.
Yepp. Thanks!
from ruby.
Related Issues (20)
- Bowling: missing test HOT 1
- Ruby Basics Introduction.md typo HOT 4
- Savings account HOT 13
- `boutique-inventory`: mistake in `introduction.md` for the exercise and `about.md` for the concept
- Zipper needs a test for .up.up HOT 3
- test is wrong here [triangle] HOT 2
- [tests] Microwave exercise test suite have errors. HOT 6
- 🤖 Sync error for commit 731e26 HOT 3
- Error in boutique_inventory_test.rb HOT 2
- Simple Linked List exercise confusion HOT 4
- Pre-requisite and missing hints for Simple Calculator HOT 4
- stock_for_item method in boutique Inventory challenge HOT 4
- `item_names` in Boutique Inventory challenge HOT 1
- Kindergarten Garden may be harder than defined HOT 4
- [SavingAccounts]: Suggestion: change negative interest rate tests to return positive value HOT 5
- Hacktoberfest 2022 HOT 2
- Binary Search Ruby HOT 3
- TwoBucket - possible error in test suite HOT 4
- Question about function name in "Moviegoer" exercism HOT 2
- Typo in final bird_count test where "whith" should be "with" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby.