Sha256: a2ddaa665f6e73031db56182994e2909bd04e340430ff674cc6439f81ad45d71

Contents?: true

Size: 627 Bytes

Versions: 27

Compression:

Stored size: 627 Bytes

Contents

require File.expand_path("spec_helper", File.dirname(__FILE__))

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

27 entries across 27 versions & 1 rubygems

Version Path
roda-2.29.0 spec/freeze_spec.rb
roda-2.28.0 spec/freeze_spec.rb
roda-2.27.0 spec/freeze_spec.rb
roda-2.26.0 spec/freeze_spec.rb
roda-2.25.0 spec/freeze_spec.rb
roda-2.24.0 spec/freeze_spec.rb
roda-2.23.0 spec/freeze_spec.rb
roda-2.22.0 spec/freeze_spec.rb
roda-2.21.0 spec/freeze_spec.rb
roda-2.20.0 spec/freeze_spec.rb
roda-2.19.0 spec/freeze_spec.rb
roda-2.18.0 spec/freeze_spec.rb
roda-2.17.0 spec/freeze_spec.rb
roda-2.16.0 spec/freeze_spec.rb
roda-2.15.0 spec/freeze_spec.rb
roda-2.14.0 spec/freeze_spec.rb
roda-2.13.0 spec/freeze_spec.rb
roda-2.12.0 spec/freeze_spec.rb
roda-2.11.0 spec/freeze_spec.rb
roda-2.10.0 spec/freeze_spec.rb