-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support skipped tests #57
Comments
I think I might have one:
Using the |
@AdrieanKhisbe: Nice! I definitely like the approach of adding the What if |
@erichs the flag seems like the simplest solution given the current behavior of shpec. However, it's important to note that any other normal expressions within the pending test would still be evaluate, so "side effects" would have to be taken into account, which seems odd for a pending test. In other words, there's currently no way not to run a test (we can only choose whether it 'counts', not whether it's run). |
What about |
@locochris yeah, I was thinking the same thing. |
Even if I touch a lot of rspec this week, didn't know about What I would say, is that it cost us nothing to do both! :) Besides event if |
About remark of the
|
The above really isn't too bad for manually marking tests pending, @AdrieanKhisbe. I kind of like the simplicity. What I'd love though, is the ability to dynamically mark tests pending at run time, and have all statements ignored until the next That might technically be possible using a |
what do you mean dynamically mark them at pending time? An alternative would be that the test are function definition.
no code is run before function is invoked But I'm not sure that is really a direction we should go into. |
@AdrieanKhisbe, the other day, I had to do a runtime check, and conditionally execute various tests, like: if connected_to_vpn; then
describe "when vpn-connected, hosts are reachable"
it "pings myhost1"
assert pingable myhost1 192.168.1.1
end
...
end
else
echo "not attached to vpn, skipping"
fi What I'd love to be able to say, is: describe "when vpn-connected, hosts are reachable"
it "pings myhost1"
connected_to_vpn || pending
assert pingable myhost1 192.168.1.1
end
...
end Having to surround the tests with |
Okey. Now I perfectly see the use case :) |
I think the way to go is to "impose" the use of (problem is that would put a constraint on interpolation)
|
@erichs @AdrieanKhisbe I think that an @AdrieanKhisbe I'm not sure what you're getting at with the |
I do agree. gonna start to work on this after I rebase on @hlangeveld pull request |
On 04/18/15 13:23, Adriean Khisbe wrote:
I will try to clean up the PR and address most issues this weekend. |
On 04/18/15 13:23, Adriean Khisbe wrote:
Oops, I think I've got a simple mechanism working for this. I made the changes @rylnd requested. In the morning I'll check the looks of the code, |
No hurry, I don't plan to start before monday at best. :) |
Well, I think I've got something working: A keyword See the travis-ci output for what it looks like. |
That could be useful indeed :) One suggestion, (on seems to be easily implementable according https://github.com/hlangeveld/shpec/blob/feature_skip/bin/shpec#L13), is to take in argument the number of asserts to be skipped.
|
Any latest incarnation on this skip-test feature? |
@stephenchu thanks for your interest. I'm personally not sure where this feature is at; it may be easier to write this from scratch than to try and resurrect an old implementation. Could you please explain the use case that you're trying to solve? I'd like to ensure that if this gets implemented, it's done so in a way that is useful to those that want it. |
@stephenchu I will try to get to this by the end of the year, but I'll be honest: it's not a priority for me. It seems like a fairly straightforward feature if you wanted to take a crack at it; PRs are always welcome! |
Thanks @rylnd for this awesome project! Any thoughts on how to implement skipped tests?
The text was updated successfully, but these errors were encountered: