Sha256: 198bdcdb21726ca443be45f4a84747a731c33312eb69172758d9cafcc8a6e149

Contents?: true

Size: 564 Bytes

Versions: 17

Compression:

Stored size: 564 Bytes

Contents

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

describe "symbol_views plugin" do
  before do
    app(:bare) do
      plugin :symbol_views

      def view(s)
        "v#{s}"
      end

      route do |r|
        r.root do
          :sym
        end

        r.is "string" do
          'string'
        end
      end
    end
  end

  it "should call view with the symbol" do
    body.should == "vsym"
  end

  it "should not affect other return types" do
    body("/string").should == 'string'
    body("/foo").should == ''
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
roda-2.2.0 spec/plugin/symbol_views_spec.rb
roda-2.1.0 spec/plugin/symbol_views_spec.rb
roda-2.0.0 spec/plugin/symbol_views_spec.rb
roda-1.3.0 spec/plugin/symbol_views_spec.rb
roda-1.2.0 spec/plugin/symbol_views_spec.rb
roda-1.1.0 spec/plugin/symbol_views_spec.rb
roda-cj-1.0.5 spec/plugin/symbol_views_spec.rb
roda-cj-1.0.4 spec/plugin/symbol_views_spec.rb
roda-cj-1.0.3 spec/plugin/symbol_views_spec.rb
roda-cj-1.0.2 spec/plugin/symbol_views_spec.rb
roda-cj-1.0.1 spec/plugin/symbol_views_spec.rb
roda-cj-1.0.0 spec/plugin/symbol_views_spec.rb
roda-1.0.0 spec/plugin/symbol_views_spec.rb
roda-cj-0.9.6 spec/plugin/symbol_views_spec.rb
roda-cj-0.9.5 spec/plugin/symbol_views_spec.rb
roda-cj-0.9.4 spec/plugin/symbol_views_spec.rb
roda-cj-0.9.3 spec/plugin/symbol_views_spec.rb