All Versions
36
Latest Version
Avg Release Cycle
36 days
Latest Release
111 days ago

Changelog History
Page 1

  • v0.11.3

    February 11, 2020
    • 0️⃣ Disable RSpec/AggregateFailures by default. ([@pirj][])
  • v0.11.2

    February 11, 2020
    • 🛠 Fix RuboCop integration regressions. ([@palkan][])
  • v0.11.1

    February 10, 2020
    • ➕ Add config/ to the gem contents. ([@palkan][])

    Fixes RuboCop integration regression from 0.11.0.

  • v0.11.0

    February 09, 2020
    • Fix let_it_be issue when initialized with an array/enumerable or an AR relation. ([@pirj][])

    • 👌 Improve RSpec/AggregateExamples (formerly RSpec/AggregateFailures) cop. ([@pirj][])

  • v0.10.2

    January 07, 2020
    • 🛠 Fix Ruby 2.7 deprecations. ([@lostie][])
  • v0.10.1

    October 17, 2019
    • 🛠 Fix AnyFixture DSL when using with Rails 6.1+. ([@palkan][])

    • Fix loading let_it_be without ActiveRecord present. ([@palkan][])

    • 🛠 Fix compatibility of before_all with isolator gem to handle correct usages of non-atomic interactions outside DB transactions. ([@Envek][])

    • ⚡️ Updates FactoryProf to show the amount of time taken per factory call. ([@tyleriguchi][])

  • v0.10.0

    August 19, 2019
    • 💎 Use RSpec example ID instead of full description for RubyProf/Stackprof report names. ([@palkan][])

    For more complex scenarios feel free to use your own report name generator:

      # for RubyProf
      TestProf::RubyProf::Listener.report_name_generator = ->(example) { "..." }
      # for Stackprof
      TestProf::StackProf::Listener.report_name_generator = ->(example) { "..." }
    
    • Support arrays in let_it_be with modifiers. ([@palkan][])
      # Now you can use modifiers with arrays
      let_it_be(:posts, reload: true) { create_pair(:post) }
    
    • Refactor let_it_be modifiers and allow adding custom modifiers. ([@palkan][])
      TestProf::LetItBe.config.register_modifier :reload do |record, val|
        # ignore when `reload: false`
        next record unless val
        # ignore non-ActiveRecord objects
        next record unless record.is_a?(::ActiveRecord::Base)
        record.reload
      end
    
    • ⚠ Print warning when ActiveRecordSharedConnection is used in the version of Rails 👌 supporting lock_threads (5.1+). ([@palkan][])
  • v0.9.0

    May 14, 2019

    🚀 This release is inspired by ideas discussed and implemented in this PR to Discourse. Specials thanks to @danielwaterworth and @SamSaffron.

    tl;dr before_all hooks, let_it_be aliases, better Fabrication support.

    before_all

    • Added global callbacks to before_all.

    ⏪ Now you can execute additional code before and after every before_all transaction begins and rollbacks:

    TestProf::BeforeAll.configure do |config| config.before(:begin) do# do something before transaction opensend config.after(:rollback) do# do something after transaction closesendend
    

    let_it_be

    • Added ability to use let_it_be aliases with predefined options.

      TestProf::LetItBe.configure do |config| config.alias_to :let_it_be_with_refind, refind: trueend

    ✅ Then use it in your tests:

    describe "smth" do let\_it\_be\_with\_refind(:foo) { Foo.create } # refind can still be overridden let\_it\_be\_with\_refind(:bar, refind: false) { Bar.create }end
    

    FactoryProf

    • ➕ Added timings to FactoryProf report.

      [TEST PROF INFO] Factories usage

      Total: 15285
      Total top-level: 10286
      Total time: 299.5937s
      Total uniq factories: 119

      total top-level total time top-level time name 6091 2715 115.7671s 50.2517s user 2142 2098 93.3152s 92.1915s post

    FactoryDoctor

    ➕ Added Fabrication support.

    ➕ Added threshold and instrumentation event customization.

    NOTE: default threshold is 0.01s (i.e. if the DB time is less for the example, we consider it "good").

    $ FDOC=1 FDOC\_EVENT="sql.rom" FDOC\_THRESHOLD=0.1 rspec
    

    EventProf

    • ➕ Added guard and top_level options to EventProf::Monitor.

    For example:

    TestProf::EventProf.monitor( Sidekiq::Client, "sidekiq.inline", :raw\_push, # top\_level: true means that we do not trigger events when the method is# called recursively within itselftop\_level: true, # only trigger the event when guard returns `true`guard: -\>(\*) { Sidekiq::Testing.inline? } )
    
    • ➕ Added Fabrication support for factory.create event.
  • v0.8.0

    April 12, 2019

    Cosmonautics Day special.

    Major changes

    💎 This release makes Ruby 2.4+ required and also RSpec 3.5+ required (for RSpec-related functionality).

    🔋 Features

    • 👉 Make before_all compatible with isolator.

    📚 📖 Documentation

    • 🌲 Add with_logging and with_ar_logging helpers to logging recipe.

    📚 📖Documentation

  • v0.7.5

    February 22, 2019

    🔄 Changes

    Make let_it_be and before_all work with include_context in RSpec.configure.

    🛠 Fixes #117