You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a gem which provides a generator so I tried to writing features using your gem. However I had some trouble with it, Rails can't find my generator when invoked by aruba, if I repeats manually the steps written in Aruba DSL everything works.
This is a failing scenario
Background: A new rails application has been created with my gem
Given a rails application named "my_app" exists
And this gem is installed in that application
@announce
Scenario: Installation using default values
When I successfully run `rails generate my_generator:install`
# this is needed because rails g returns 0 when can't find the generator
And the output should not contain "Could not find generator"
Then a file named "config/initializers/devise.rb" should exist
This is the steps in the Background code
Given /^a rails application named "([^\"]*)" exists$/ do |app_name|
@app_name = app_name
Given "I successfully run `rm -rf #{app_name}`" # added to ensure that the working directory is clean
And "a directory named \"#{app_name}\" should not exist"
And "I successfully run `rails new #{app_name}`"
And "I cd to \"#{app_name}\""
end
When /^this gem is installed in that application$/ do
gempath = File.expand_path('../../../', __FILE__)
Given "I append to \"Gemfile\" with \"gem 'gem-name', :path => '#{gempath}'\""
And "I successfully run `bundle check`"
end
If I cd into tmp/aruba/my_app and run rails generate my_generator:install it does work. Moreover my gem uses devise, I tried to debug what's happening, with @announce tag and by putting a When I run "rails g --help" step in my feature and I saw that devise generators are there, but mine is not.
I'm using aruba 0.4.3, cucumber 0.10.7 and rails 3.0.9
I will release the gem on github in a couple of days, so you can see the complete code.
P.S. I have another question, I put it here, and if it's the case I can open another ticket. When I run features they are ran on a dirty working directory (I added a rm -rf my-used-dir before my steps to avoid it), imho your gem should cleanup everything inside the tmp/aruba directory before running features. Don't you think? Am I missing something?
The text was updated successfully, but these errors were encountered:
I'm writing a gem which provides a generator so I tried to writing features using your gem. However I had some trouble with it, Rails can't find my generator when invoked by aruba, if I repeats manually the steps written in Aruba DSL everything works.
This is a failing scenario
This is the steps in the Background code
If I cd into
tmp/aruba/my_app
and runrails generate my_generator:install
it does work. Moreover my gem uses devise, I tried to debug what's happening, with @announce tag and by putting aWhen I run "rails g --help"
step in my feature and I saw that devise generators are there, but mine is not.I'm using aruba 0.4.3, cucumber 0.10.7 and rails 3.0.9
I will release the gem on github in a couple of days, so you can see the complete code.
P.S. I have another question, I put it here, and if it's the case I can open another ticket. When I run features they are ran on a dirty working directory (I added a rm -rf my-used-dir before my steps to avoid it), imho your gem should cleanup everything inside the tmp/aruba directory before running features. Don't you think? Am I missing something?
The text was updated successfully, but these errors were encountered: