Skip to content
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

p:step-available('p:validate-with-relax-ng') returns true when p:validate-with-relax-ng is not available #117

Closed
josteinaj opened this issue Aug 22, 2013 · 4 comments

Comments

@josteinaj
Copy link
Contributor

josteinaj commented Aug 22, 2013

When Jing is not on the classpath, p:validate-with-relax-ng doesn't work. However, p:step-available('p:validate-with-relax-ng') still returns true. Shouldn't it return false?

The same probably goes for the other steps which requires external libraries, although I haven't tested those...

@ndw
Copy link
Owner

ndw commented Aug 22, 2013

Yes, that's a good point. I'll see about fixing that.

@ndw
Copy link
Owner

ndw commented Sep 22, 2013

After some investigation, I don't think this is practical.

Realistically, all that p:step-available can tell (in XML Calabash v1.x) is whether or not the step can be instantiated, not whether or not it will run successfully. I think you'll have to use p:try/p:catch to deal with runtime errors.

I'll try to do better in the V.next architecture.

@ndw ndw closed this as completed Sep 22, 2013
@ndw
Copy link
Owner

ndw commented Sep 23, 2013

Changed my mind. :-)

@ndw ndw reopened this Sep 23, 2013
ndw added a commit that referenced this issue Sep 23, 2013
…les and other problems that prevent a class from being instantiated will now cause p:step-available to return false. There's also a static isAvailable() method that steps can use for finer control.
ndw added a commit that referenced this issue Sep 23, 2013
…les and other problems that prevent a class from being instantiated will now cause p:step-available to return false. There's also a static isAvailable() method that steps can use for finer control.
@ndw
Copy link
Owner

ndw commented Sep 23, 2013

There. That's better.

@ndw ndw closed this as completed Sep 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants