...file type and adjust the code template according to your preferences. For example, the RSpec code template generates way too much boilerplate. Something like this is far more suitable for...

...following test was taken from a project using ActionDispatch::IntegrationTest. Though we usually use RSpec, this should give you the general idea. context 'favicons' do def link_selectors [ ['link[href...

makandra dev

...the console IRB. console command: Ctrl + C now properly exits a local Rails console rspec and cucumber commands: Run specs even if the automatic chromedriver update fails Improve detection of...

This only applies to RSpec below version 1.3.2. The issue has been fixed in RSpec 1.3.2, and most likely RSpec 2 and later versions. When you have a helper that...

...get('@content_for_title').should == 'Hello Universe' end Unfortunately, this may only work once. RSpec instanciates the helper object only once, thus keeping instance variables -- and since content_for always...

...instructions in the README. Most likely you want: to add the Ruby, Rails and RSpec cops to include the unit test 2. Report all existing offenses and exclude them initially...

...container you can run your tests export CHROMEDRIVER_URL=http://localhost:9999 bundle exec rspec specs/system/test_spec.rb # You might need to set remove `--headless` from your chromedriver options in e.g. selenium...

...applications that use RSpec, so don't upgrade if that is your setup. The rspec-rails gem has a fatal bug that was only fixed for rspec-rails-2.x...

...which only supports Rails 3. There is no fix for the rspec-rails-1.3.x series of the gem which supports Rails 2. Anyway, here are upgrade instructions if you...

...out which test throws this deprecation warning. There are other workarounds, too: Geordi with Rspec: geordi rspec spec/ (providing a path will lead to a run in a single process...

...Rspec: bundle exec rspec Cucumber: DISPLAY=:17 bundle exec cucumber (Just like geordi uses port 17 for VNC to not see a test browser...

...adapter = :sidekiq To set specific adapters in tests, you can create a spec/support/active_job.rb with: RSpec.configure do |config| config.before(:suite) do ActiveJob::Base.queue_adapter = :test end end and a features/support/active_job.rb with...

github.com

...write specs on how many database queries you expect. Use the make_database_queries RSpec matcher from the linked Ruby Gem...

...Only for running tests in a real browser (suggested) gem 'capybara-screenshot' # Optionally gem 'rspec' # Dependency of Spreewald end Now run bundle exec cucumber --init and add this code to...

...your features, specs or unit tests: rake parallel:test # Test::Unit rake parallel:spec # RSpec rake parallel:features # Cucumber rake parallel:features[2] # example how to execute cucumber features with...

...comment out this line at least (in your env.rb) end Issues parallel_tests breaks rspec matcher =~ for array comparision\ Solution: Use == if possible or just compare ids for example (xxx.collect...

...and exited with 1 during . Rails 2/3 migrations don't work anymore bundle exec rspec spec -- create_table(:users) bundler: failed to load command: rspec (/home/travis/build/makandra/minidusen/vendor/bundle/ruby/2.2.0/bin/rspec) ActiveRecord::StatementInvalid: Mysql2::Error...

makandra dev

...Remove oniguruma Remove net-ssh and net-scp Remove fastercsv Remove cucumber_spinner Remove rspec_spinner Update rspec to '< 2' Lock haml to '= 3.1.7' Unlock andand Unlock rake

...failing features. require 'capybara-screenshot/cucumber' Capybara::Screenshot.prune_strategy = { keep: 12 } # parallel_tests TODO: Add rspec-patches gem from PH Code changes Remove UTF8 hints at the top of files...

makandra dev
github.com

...of a command, e.g. geordi rs or geordi dev[server] command dependencies, e.g. geordi rspec invokes geordi bundle-install (which bundles only if needed) no cluttered /usr/bin, but all commands...

...selecting the server with --select-server tests: run all employed tests; checks for: Cucumber, RSpec, Test::Unit and rake with-firefox-for-selenium: previously run_tests, runs a given command...

makandra dev

...ENV['TEST_ENV_NUMBER'] %> Create test databases script/dbconsole -p CREATE DATABASE `xxx_test2`; ... Generate RSpec files script/generate rspec (you'll probably only let it overwrite files in script/)

makandra dev
github.com

removes confusion with Rails' built in integration tests (you put capybara rspec integration tests into the spec/feature/... folder) and the :type metadata has been changed from :request to...

...by the identifier) has a new syntax for writing integration tests with capybara in rspec (describe => feature, it => scenario) Excerpt of some other major changes has_content? doesn't match...

...copy the attached file to lib/tasks/rcov.rake. After that rake rcov:all will run all RSpec examples and Cucumber features. The report will be written RAILS_ROOT/coverage/index.html. Here is what the...

...task does in detail: Generates aggregated coverage of both RSpec and Cucumber Works with Rails 2 and Rails 3 Reports for app/**/*.rb and nothing else If called with an...

Warnings like those below may originate from rspec or shoulda-matchers or other gems that have not updated yet to the new MiniTest API. One Warning: you should require 'minitest/autorun...

...minitest"' before 'require "minitest/autorun"' # (backtrace) Solution: Add gem 'minitest' to your Gemfile, before any rspec gem. Another MiniTest::Unit::TestCase is now Minitest::Test. From /Users/makandra/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/test/unit/testcase.rb:8:in ` '

makandra dev

...by the compile: true setting in config/webpacker.yml. Note that this can also cause your RSpec specs to compile assets if you have any view specs, if a model refers to...

Run rspec-and-cucumber from any project directory to run both RSpec and Cucumber. If available, rspec_spinner or cucumber_spinner are used. Note that features are not run when...

...use webmock like you are used to. Here is how to do this in rspec. RSpec.configure do |config| config.around do | example | if example.metadata[:turn_off_vcr] VCR.turn_off! example.run VCR.turn...

...are affected by the issue: The field's content "" did not match "some-text" (RSpec::Expectations::ExpectationNotMetError) Issue with headless Chrome After removing the line above in the configuration it...

makandra dev

With Rspec you can mock objects or functions, for example like this: expect(my_object).to receive(:my_function).and_return('hello world') It's also easy to remove mocks...

RSpec::Mocks.space.proxy_for(my_object).reset