spec/timber/cli/installers/config_file_spec.rb in timber-2.1.6 vs spec/timber/cli/installers/config_file_spec.rb in timber-2.1.7
- old
+ new
@@ -24,27 +24,13 @@
path = "/path/to/file"
config_file = Timber::CLI::ConfigFile.new(path, installer.file_helper)
expect(Timber::CLI::ConfigFile).to receive(:new).with(path, installer.file_helper).and_return(config_file)
expect(config_file).to receive(:exists?).exactly(1).times.and_return(false)
- expect(installer).to receive(:logrageify?).exactly(1).times.and_return(true)
+ expect(installer).to receive(:lograge?).exactly(1).times.and_return(true)
expect(config_file).to receive(:logrageify!).exactly(1).times
expect(config_file).to receive(:create!).exactly(1).times
installer.run(app, path)
- end
- end
-
- describe ".logrageify?" do
- it "should do nothing if Lograge is not detected" do
- expect(installer.send(:logrageify?)).to eq(false)
- expect(output.string).to eq("")
- end
-
- it "should prompt for Lograge configuration and return true for y" do
- allow(installer).to receive(:lograge?).and_return(true)
- input.string = "y\n"
- expect(installer.send(:logrageify?)).to eq(true)
- expect(output.string).to eq("\n--------------------------------------------------------------------------------\n\nWe noticed you have lograge installed. Would you like to configure \nTimber to function similarly?\n(This silences template renders, sql queries, and controller calls.\nYou can always do this later in config/initialzers/timber.rb)\n\n\e[34my) Yes, configure Timber like lograge\e[0m\n\e[34mn) No, use the Rails logging defaults\e[0m\n\nEnter your choice: (y/n) ")
end
end
end