Sha256: 4ea9106c579b3e6be4249a7da76fd40ecacd3152fdeaa600425b5121e0a83a1c

Contents?: true

Size: 865 Bytes

Versions: 10

Compression:

Stored size: 865 Bytes

Contents

require "spec_helper"

require "nabaztag_hack_kit/server"

describe NabaztagHackKit::Server do
  let(:app) { NabaztagHackKit::Server.new }

  describe "#bc.jsp" do
    def do_action(path)
      app.call({
        'REQUEST_METHOD' => 'GET',
        'PATH_INFO'      => path,
        'rack.input'     => StringIO.new
      })
    end

    it "reads from public/bytecode.bin" do
      pending
      app.should_receive(:send_file).with("public/bytecode.bin")
      do_action '/bc.jsp'
    end

    context "with custom bin code route" do
      let(:app) { NabaztagHackKit::Server.new(custom_route) }
      let(:custom_route) { "bytecode.bin" }

      it "reads from" do
        pending
        app.should_receive(:send_file).with(custom_route)
        do_action '/bc.jsp'
      end
    end
  end

  describe "#on" do
    it "accepts" do
      pending
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nabaztag_hack_kit-0.1.0.beta3 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.beta2 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.beta1 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.alpha7 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.alpha6 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.alpha5 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.alpha4 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.alpha3 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.alpha2 spec/unit/server_spec.rb
nabaztag_hack_kit-0.1.0.alpha1 spec/unit/server_spec.rb