File: default_test.rb

package info (click to toggle)
ruby-scientist 1.6.5-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 292 kB
  • sloc: ruby: 1,239; sh: 23; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
describe Scientist::Default do
  before do
    @ex = Scientist::Default.new "default"
  end

  it "is always disabled" do
    refute @ex.enabled?
  end

  it "noops publish" do
    assert_nil @ex.publish("data")
  end

  it "is an experiment" do
    assert Scientist::Default < Scientist::Experiment
  end

  it "reraises when an internal action raises" do
     assert_raises RuntimeError do
       @ex.raised :publish, RuntimeError.new("kaboom")
     end
  end
end