spec/configuration_spec.rb in ferver-1.2.1 vs spec/configuration_spec.rb in ferver-1.3.0
- old
+ new
@@ -1,12 +1,11 @@
require 'spec_helper'
describe Ferver::Configuration do
- subject { Ferver::Configuration.new }
+ subject { described_class.new }
describe 'configured directory path' do
-
context 'with no path set' do
it 'should return default path' do
expect(subject.directory_path).to eq(Ferver::DEFAULT_FILE_SERVER_DIR_PATH)
end
end
@@ -16,9 +15,25 @@
it 'should return default path' do
subject.directory_path = path
expect(subject.directory_path).to eq(path)
+ end
+ end
+ end
+
+ describe "serving all files" do
+ context "with no configuration set" do
+ it "is false by default" do
+ expect(subject.serve_hidden?).to be false
+ end
+ end
+
+ context "when configured to serve hidden" do
+ it "is true" do
+ subject.serve_hidden = true
+
+ expect(subject.serve_hidden?).to be true
end
end
end
end