-
Notifications
You must be signed in to change notification settings - Fork 112
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
Custom functions not supported in steps? #16
Comments
There are actually two ways. On edge Turnip (doesn't work in the latest gem release), you could do this: steps_for :global do
def log_in ... end
end Or you could use RSpec's configure mechanism (remember, Turnip is just RSpec with fancy sugar): module LogInStuff
def log_in ... end
end
RSpec.configure do |config|
config.include LogInStuff, :turnip => true
end or something like that. |
That seems to work. Now I have to find a way, to get turnip working in RubyMine. But thats another issue, and I can workaround with command line |
If you came here googling, this is useful: using steps_for(:global) is deprecated, add steps to Turnip::Steps instead. |
|
Even if I did, I wouldn't remember anymore. I created the issue 9 years ago and moved along. I do use ruby only on very rare occasions and only for very small scripts without extensive testing. |
Hi!
I am going to move from cucumber to turnip, but while converting my steps an error occured...
The converted stepfile can be found at https://github.com/NobbZ/webworld/blob/feature/turnip/spec/turnip_steps.rb
When I try to run a feature that requires a login I get the following error:
Is there a way to use my "log_in" function or do I have to repay myself and write the necessarely commands in every step that should use this function?
The text was updated successfully, but these errors were encountered: