Skip to content

Spec failures in Rails 4.2 #30

@arthurchui

Description

@arthurchui

There are 3 broken specs in Rails 4.2. Fix them if they are not too difficult; otherwise we should officially discontinue to support Rails 4.

# Update jit_preloader.gemspec
spec.add_dependency "activerecord", ">= 4.2"
spec.add_development_dependency "sqlite3", "< 1.4"
> bundle exec rspec spec

  1) JitPreloader::Preloader for single table inheritance when preloading an aggregate of a child model through its base model can handle queries
     Failure/Error: expect(contact_books.first.employees_count).to eq 4

       expected: 4
            got: 0

       (compared using ==)
     # ./spec/lib/jit_preloader/preloader_spec.rb:75:in `block (4 levels) in <top (required)>'

  2) JitPreloader::Preloader for single table inheritance when preloading an aggregate of a nested child model through another child model can handle queries
     Failure/Error: expect(contact_books.first.company_employees_count).to eq 2

       expected: 2
            got: 0

       (compared using ==)
     # ./spec/lib/jit_preloader/preloader_spec.rb:91:in `block (4 levels) in <top (required)>'

  3) JitPreloader::Preloader for single table inheritance when preloading an aggregate of a nested child model through a many-to-many relationship with another child model can handle queries
     Failure/Error: expect(contact_books.first.children_count).to eq 4

       expected: 4
            got: 0

       (compared using ==)
     # ./spec/lib/jit_preloader/preloader_spec.rb:105:in `block (4 levels) in <top (required)>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions