...backported functionality from modern Rubies Migrating from require to require_relative where I loaded RSpec factories in Cucumber's env.rb (the Rails application root is no longer in the load...

Webmocks hash_including is similar to RSpec::Mocks::ArgumentMatchers#hash_including. Be aware that hash_including (webmock v3.0.1) doesn't parse integer values to String. Without hash including you would...

...installation guide: # Gemfile gem 'shoulda-matchers', require: false # spec/rails_helper.rb if present, spec/spec_helper.rb else require 'rspec/rails' require 'shoulda/matchers...

...the runtime of different strategies using an average-sized Rails project (with MySQL): Cucumber RSpec Transaction 87.14, 86.65 10.20, 10.11 Truncation 90.43, 90.69 26.82, 26.46

makandra dev
github.com

Improve geordi tests: If rake runs tests, skip other test runs (cucumber, rspec), as rake usually runs all employed tests Rename geordi devserver to geordi server (the former...

...the block, Project.make will only run once when the blueprint is parsed (usually when RSpec is loaded), which is not what you want...

gist.github.com

...put it into config/initializers/ to make those warnings go away. Since we're using RSpec on most projects, I've transformed the test for it to a spec. See the...

If you use rails_admin, your specs pass with the rspec binary, but not using rake spec (or rake parallel:spec etc), put this at the top of your spec...

makandra dev

Spreewald 1.1.0 drops the be_true and be_false matchers in order to be RSpec 3 and Ruby 2 compatible. For backward compatibility, these matchers are replaced with == true and...

wiki.macromates.com

When using TextMate2 with the cucumber bundle, it does not recognize step definitions (e.g. custom_steps.rb) as such but believes they...

.../customer-2/https:\/\/gitlab-ci-token:$CI_CUSTOMER_2_ACCESS_TOKEN@code.example.com\/dev\/customer-2.git/" .gitmodules - git submodule init - git submodule update - bundle install rspec: script: - bundle exec rake db:create db:migrate - bundle exec rspec This approach requires you...

benmabey.com

...and should be used appropriately based on the situation. The majority of examples on rspec's story runner currently on the web, including mine, are of the imperative type. Since...

makandra dev

Now supports RSpec 3 and Rails 4 Drops support for state_machine, which has some issues with Rails 4 and isn't actively maintained

github.com

Using this gem, whenever a Capybara test in Cucumber, Rspec or Minitest fails, the HTML for the failed page and a screenshot (when using capybara-webkit, Selenium or poltergeist) is...

makandra dev

...increases, too. You can use the very same way Henning suggested for speeding up RSpec some time ago. Put the following into features/support/deferred_garbage_collection.rb Before do DeferredGarbageCollection.start end After do DeferredGarbageCollection.reconsider...

...USERS_PER_PAGE", 10, MyCustomObject There's a card with the constants helper for Rspec...

Best results in other decks

makandra Curriculum

...now, Chapter 8 is currently work in progress for the Rails 7 version Documentation for rspec-core Using metadata attributes to write spec-type specific before blocks Shared examples and...

...method and observe its return value or side effects. Your MovieDB already uses the gem rspec-rails which has many different types of specs. These help you take a close...

...api.chucknorris.io/jokes/random') res = Net::HTTP.get_response(uri) expect(res.body).to include('Paul') end end rspec spec/chuck_norris_spec.rb . Finished in 0.00759 seconds (files took 0.49565 seconds to load) 1 example, 0 failures

Search in all decks