This Question is Possibly Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
1 Replies Last post: Oct 11, 2013 7:41 AM by Oleg Sukhodolsky  
Joshua Coady Newbie 6 posts since
Sep 24, 2013
Currently Being Moderated

Oct 11, 2013 4:35 AM

How to run capybara feature tests?

I am using Idea EAP with ruby plugin from mid-sept. I have a capybara feature test (feature is just an alias for describe, scenario for it). So, instead of

 

describe 'my test' do
  it 'does stuff' do
    ...
  end
end

 

you can do

 

feature 'my test' do
  scenario 'does stuff' do
    ...
  end
end

 

The file is located at test/features/my_test.rb

 

Only hitch is you cant hit Ctrl+Shift+F10 to start the test because when you do, it just tries to run it as a normal ruby file. If you change feature to describe, it recognizes it as a test file and runs in the test runner when you hit Ctrl+Shift+F10 except that it doesnt recognize scenario so it fails. If you then change describe back to feature and hit the run button in the test runner window to rerun the test, it runs perfectly.

 

Any idea how I can get this to run the first time I hit Ctrl+Shift+F10?

Oleg Sukhodolsky JetBrains 844 posts since
Apr 4, 2012
Currently Being Moderated
Oct 11, 2013 7:41 AM in response to: Joshua Coady
Re: How to run capybara feature tests?

Hi,

 

we do not support Capybara DSL yet, there is a ticket about it - http://youtrack.jetbrains.com/issue/RUBY-12803

As usual, you are welcome to vote for it

 

Regards, Oleg.

More Like This

  • Retrieving data ...