If you don't want this way, then the problem is that you're running ruby test.rb, actually test.rb this should be runned via rspec: $ rspec test.rb Then run: bundle exec rspec spec/features/test.rb from your project root. Now create a new spec/features/test.rb file with something like this: require 'spec_helper'ĭescribe 'Google homepage test', js: true do second nature with RubyMines flexible, well-thought-out RSpec, Cucumber.
#Rubymine rspec how to#
With step-by-step instructions and practical examples, you will learn how to customize the environment precisely to suit your needs, debug and test your code, and get the most out of many other features of RubyMine. You can change the driver, host and other configs if you want. RubyMine provides smart coding assistance, intelligent code refactoring. Instant RubyMine Assimilation shows you how to integrate the RubyMine development environment into your everyday development process. The above code will setup rspec, capybara. Selenium:: = File.dirname(Dir.pwd) + '/project_dir_name/log/selenium.log'Ĭapybara.register_driver :firefox do |app|Ĭapybara::Selenium::Driver.new(app, browser: :firefox) Gem 'selenium-webdriver', '~> 3.142', '>= 3.142.6'Ĭreate a spec/ directory in your project rootĬreate a log/ directory in your project root for your selinium logs.Ĭreate a spec/spec_helper.rb file with configuration like this: # frozen-string-literal: true In your project root folder, add Gemfile file, this Gemfile can have something like this: source '' Depending on your project type (Ruby or Rails), use the rspec or rspec-rails gem. RSpec is a popular BDD framework for testing Ruby/Rails applications. But its not even launching Firefox browser and not printing puts in the console. Before running Minitest tests in RubyMine, make sure that the 'minitest' gem is added to the Gemfile and installed to the project's SDK. As a newbie I dont see any issue with the code. Got the below output as shown in below screenshot. Right clicked on test.rb and selected Run 'test'.
#Rubymine rspec install#
I added below code in test.tb file(already did gem install for selenium-webdriver and rspec) as shown in below screenshot.