I'm relatively new to Ruby Mine and Ruby in general. I was hoping to get an answer to two questions:
1) I have created a gem that contains a common set of functions and step definitions. I am able to generate and install the gem into my local machine just fine. When I import the gem (via adding it to my test project's Gemfile and running the Bundler install), the custom functions wire up to my steps in the test project. However, I am unable to get intellisense to recognize my step defitnitions that reside in the gem. They just show up as 'Undefined steps' inside my feature file. When I debug the project, it runs through the steps with no issue.
I was wondering if there was a specific file structure / naming convention / etc that I need to use in order for Ruby Mine to recognize these step definitions? I tried searching around, but all the exampls I found were for published gems (ex: cucumber, calabash, etc). I tried to mimick their setup with little success.
For a little clarity, here is an example:
Inside my gem I have these two things in two seperate files:
When (/^"([^"]*)" is visible$/) do |search_text|
# @param [String] object_id
# @param [String] object_class
# @param [String] timeout
def wait_for_element(object_id, object_class, timeout = 40)
wait_for_elements_exist([object_class+" marked:'"+object_id+"'"], :timeout => timeout)
When I install my gem in my other test project, I can see both the files just fine. If I use wait_for_element(), Ruby Mine gives me full intellisense and is able to navigate to the code snippet. However, if I try to use When "Some Text" is visible inside a feature file, the text is highlighted and Ruby Mine marks the step as undefined.
2) We are exploring the idea of installing a private gem server to host these custom gems. I know Ruby Mine has the ability to build and publish gems, but I didn't see a place to overide where the gems get published too. Is it possible for me to specify our private server instead of rubygems.org?
I appologize if any of the questions I have posed have already been asked/answered. I thank you for your time and assistance.