Sha256: 448a8d1a11cbbf2df7ffa3aac55311b805b8d860a73ff1f187920a0af1c6acd3

Contents?: true

Size: 594 Bytes

Versions: 20

Compression:

Stored size: 594 Bytes

Contents

require_relative "spec_helper"

describe "Roda.freeze" do
  before do
    app{}.freeze
  end

  it "should make opts not be modifiable after calling finalize!" do
    proc{app.opts[:foo] = 'bar'}.must_raise
  end

  it "should make use and route raise errors" do
    proc{app.use Class.new}.must_raise
    proc{app.route{}}.must_raise
  end

  it "should make plugin raise errors" do
    proc{app.plugin Module.new}.must_raise
  end

  it "should make subclassing raise errors" do
    proc{Class.new(app)}.must_raise
  end

  it "should freeze app" do
    app.frozen?.must_equal true
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
roda-3.18.0 spec/freeze_spec.rb
roda-3.17.0 spec/freeze_spec.rb
roda-3.16.0 spec/freeze_spec.rb
roda-3.15.0 spec/freeze_spec.rb
roda-3.14.1 spec/freeze_spec.rb
roda-3.14.0 spec/freeze_spec.rb
roda-3.13.0 spec/freeze_spec.rb
roda-3.12.0 spec/freeze_spec.rb
roda-3.11.0 spec/freeze_spec.rb
roda-3.10.0 spec/freeze_spec.rb
roda-3.9.0 spec/freeze_spec.rb
roda-3.8.0 spec/freeze_spec.rb
roda-3.7.0 spec/freeze_spec.rb
roda-3.6.0 spec/freeze_spec.rb
roda-3.5.0 spec/freeze_spec.rb
roda-3.4.0 spec/freeze_spec.rb
roda-3.3.0 spec/freeze_spec.rb
roda-3.2.0 spec/freeze_spec.rb
roda-3.1.0 spec/freeze_spec.rb
roda-3.0.0 spec/freeze_spec.rb