Sha256: 1d18e3cebb7f0ea5ff26fb00473bbb510aae8ebf016c84696144588d2da19f08

Contents?: true

Size: 918 Bytes

Versions: 4

Compression:

Stored size: 918 Bytes

Contents

require "spec_helper"

RSpec.describe "suspenders:preloader", type: :generator do
  it "adds binstubs for Spring" do
    with_app { generate("suspenders:preloader") }

    expect("bin/rails").to match_contents(/spring/)
    expect("config/spring.rb").to exist_as_a_file
    expect("config/environments/test.rb").to \
      match_contents(/config.cache_classes = false/)
    expect("Gemfile").to match_contents(/spring/)
    expect("Gemfile").to match_contents(/spring-watcher-listen/)
  end

  it "removes Spring binstubs" do
    with_app { destroy("suspenders:preloader") }

    expect("config/environments/test.rb").to \
      match_contents(/config.cache_classes = true/)
    expect("config/spring.rb").not_to exist_as_a_file
    expect("bin/rails").not_to match_contents(/spring/)
    expect("Gemfile").not_to match_contents(/spring-watcher-listen/)
    expect("Gemfile").not_to match_contents(/spring/)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
suspenders-1.55.1 spec/features/preloader_spec.rb
suspenders-1.55.0 spec/features/preloader_spec.rb
suspenders-1.54.1 spec/features/preloader_spec.rb
suspenders-1.54.0 spec/features/preloader_spec.rb