spec/teaspoon/configuration_spec.rb in teaspoon-0.7.7 vs spec/teaspoon/configuration_spec.rb in teaspoon-0.7.8
- old
+ new
@@ -61,10 +61,14 @@
expect(subject.suites).to be_a(Hash)
expect(subject.coverage).to eq(false)
expect(subject.coverage_reports).to eq(["text-summary"])
expect(subject.coverage_output_dir).to eq("coverage")
expect(subject.server).to be_nil
+ expect(subject.statements_coverage_threshold).to be_nil
+ expect(subject.functions_coverage_threshold).to be_nil
+ expect(subject.branches_coverage_threshold).to be_nil
+ expect(subject.lines_coverage_threshold).to be_nil
end
it "allows setting various configuration options" do
Teaspoon.configuration.mount_at = "/teaspoons_are_awesome"
expect(subject.mount_at).to eq("/teaspoons_are_awesome")
@@ -74,11 +78,10 @@
it "allows defining suites" do
subject.suite(:test_suite) { }
expect(subject.suites["test_suite"]).to be_a(Proc)
end
-
end
describe Teaspoon::Configuration::Suite do
@@ -93,6 +96,14 @@
it "accepts a block that can override defaults" do
subject = Teaspoon::Configuration::Suite.new { |s| s.helper = "helper_file" }
expect(subject.helper).to eq("helper_file")
end
+
+ it "allows creating hooks" do
+ expect(subject.hooks).to eq({})
+
+ subject.hook {}
+
+ expect(subject.hooks['default'].length).to eq(1)
+ end
end